mirror of https://github.com/k3s-io/k3s
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 @smarterclaytonpull/6/head
commit
8cbc9d7e27
|
@ -539,6 +539,10 @@ func (f *DeltaFIFO) Resync() error {
|
|||
f.lock.Lock()
|
||||
defer f.lock.Unlock()
|
||||
|
||||
if f.knownObjects == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
keys := f.knownObjects.ListKeys()
|
||||
for _, k := range keys {
|
||||
if err := f.syncKeyLocked(k); err != nil {
|
||||
|
|
Loading…
Reference in New Issue