Commit c4e67252 authored by Seth Jennings's avatar Seth Jennings

fix nil deref

parent 8ef69025
...@@ -162,6 +162,9 @@ func (dswp *desiredStateOfWorldPopulator) findAndRemoveDeletedPods() { ...@@ -162,6 +162,9 @@ func (dswp *desiredStateOfWorldPopulator) findAndRemoveDeletedPods() {
} }
// Skip non-memory backed volumes belonging to terminated pods // Skip non-memory backed volumes belonging to terminated pods
volume := volumeToMount.VolumeSpec.Volume volume := volumeToMount.VolumeSpec.Volume
if volume == nil {
continue
}
if (volume.EmptyDir == nil || volume.EmptyDir.Medium != v1.StorageMediumMemory) && if (volume.EmptyDir == nil || volume.EmptyDir.Medium != v1.StorageMediumMemory) &&
volume.ConfigMap == nil && volume.Secret == nil { volume.ConfigMap == nil && volume.Secret == nil {
continue continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment