mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #53830 from juanvallejo/jvallejo/prevent-delta-fifo-store-panic
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. perform nil check before iterating over keys **Release note**: ```release-note NONE ``` Fixes panic due to nil pointer dereference Related downstream bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1377940 cc @smarterclayton
This commit is contained in:
commit
8cbc9d7e27
@ -539,6 +539,10 @@ func (f *DeltaFIFO) Resync() error {
|
|||||||
f.lock.Lock()
|
f.lock.Lock()
|
||||||
defer f.lock.Unlock()
|
defer f.lock.Unlock()
|
||||||
|
|
||||||
|
if f.knownObjects == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
keys := f.knownObjects.ListKeys()
|
keys := f.knownObjects.ListKeys()
|
||||||
for _, k := range keys {
|
for _, k := range keys {
|
||||||
if err := f.syncKeyLocked(k); err != nil {
|
if err := f.syncKeyLocked(k); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user