mirror of
https://github.com/kubernetes/kubectl.git
synced 2026-04-21 14:20:36 -04:00
kubectl: Fix panic in exec terminal size queue
Check if delegate is nil before calling Next() in terminalSizeQueueAdapter to prevent a nil pointer dereference. Kubernetes-commit: 5f675740442edc32f2dcbbe1453f49484440e7a8
This commit is contained in:
parent
6f1e4558bb
commit
de9c08efa2
1 changed files with 4 additions and 0 deletions
|
|
@ -411,6 +411,10 @@ type terminalSizeQueueAdapter struct {
|
|||
}
|
||||
|
||||
func (a *terminalSizeQueueAdapter) Next() *remotecommand.TerminalSize {
|
||||
if a.delegate == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
next := a.delegate.Next()
|
||||
if next == nil {
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue