From 6f45c1726ef3f51dbd27b5ada00c9f478eaa0046 Mon Sep 17 00:00:00 2001 From: Mrunal Patel Date: Thu, 25 Jan 2018 17:04:01 -0800 Subject: [PATCH] container_attach: Ensure ctl file is closed Signed-off-by: Mrunal Patel --- server/container_attach.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/container_attach.go b/server/container_attach.go index ec9bedab..73cfdcab 100644 --- a/server/container_attach.go +++ b/server/container_attach.go @@ -64,6 +64,7 @@ func (ss streamService) Attach(containerID string, inputStream io.Reader, output if err != nil { return fmt.Errorf("failed to open container ctl file: %v", err) } + defer controlFile.Close() kubecontainer.HandleResizing(resize, func(size remotecommand.TerminalSize) { logrus.Infof("Got a resize event: %+v", size)