From b15219034d19c285fbc5be26d6f4b59d60191ac3 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Tue, 9 Aug 2016 13:01:11 -0400 Subject: [PATCH] Prevent panic in 'kubectl exec' when redirecting stdout Just add some nil checks to make sure we don't trip over when we redirect output from exec to a file. Fixes #30290 --- pkg/client/unversioned/remotecommand/v3.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/client/unversioned/remotecommand/v3.go b/pkg/client/unversioned/remotecommand/v3.go index 7b46f940efc..e2574a93aa9 100644 --- a/pkg/client/unversioned/remotecommand/v3.go +++ b/pkg/client/unversioned/remotecommand/v3.go @@ -63,7 +63,7 @@ func (p *streamProtocolV3) createStreams(conn streamCreator) error { } func (p *streamProtocolV3) handleResizes() { - if p.resizeStream == nil { + if p.resizeStream == nil || p.TerminalSizeQueue == nil { return }