mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-17 15:50:10 +00:00
fix potential nil pointer
This commit is contained in:
parent
ee2c3c1859
commit
d483872d64
@ -292,7 +292,7 @@ func (g *GenericPLEG) relist() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if containerID, ok := events[i].Data.(string); ok {
|
if containerID, ok := events[i].Data.(string); ok {
|
||||||
if exitCode, ok := containerExitCode[containerID]; ok {
|
if exitCode, ok := containerExitCode[containerID]; ok && pod != nil {
|
||||||
klog.V(2).InfoS("Generic (PLEG): container finished", "podID", pod.ID, "containerID", containerID, "exitCode", exitCode)
|
klog.V(2).InfoS("Generic (PLEG): container finished", "podID", pod.ID, "containerID", containerID, "exitCode", exitCode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user