UPSTREAM: 39493: kubelet: fix nil deref in volume type check
@@ -160,6 +160,9 @@ func (dswp *desiredStateOfWorldPopulator) findAndRemoveDeletedPods() {
}
// Skip non-memory backed volumes belonging to terminated pods
volume := volumeToMount.VolumeSpec.Volume
+ if volume == nil {
+ continue
+ }
if (volume.EmptyDir == nil || volume.EmptyDir.Medium != api.StorageMediumMemory) &&
volume.ConfigMap == nil && volume.Secret == nil {
continue
