From 186e7456ac6ddddf31716ca083a2742b132cc225 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Tue, 12 Mar 2019 14:52:22 +0000 Subject: [PATCH] dial-stdio: Close the connection This was leaking the fd. Signed-off-by: Ian Campbell --- cli/command/system/dial_stdio.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cli/command/system/dial_stdio.go b/cli/command/system/dial_stdio.go index ceeac8223f..017ed40ce3 100644 --- a/cli/command/system/dial_stdio.go +++ b/cli/command/system/dial_stdio.go @@ -34,6 +34,7 @@ func runDialStdio(dockerCli command.Cli) error { if err != nil { return errors.Wrap(err, "failed to open the raw stream connection") } + defer conn.Close() var connHalfCloser halfCloser switch t := conn.(type) {