diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2022-01-14 13:12:26 +0100 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2022-01-24 16:05:42 +0100 |
commit | f6e36a64975fdd9c39507f4447a469de1e850598 (patch) | |
tree | 6453a8b1c9517aa12d845b9fa1c13124bafd8c9a | |
parent | b75d6baf074a61f2119b8619c86bd2fae1cb2833 (diff) | |
download | podman-f6e36a64975fdd9c39507f4447a469de1e850598.tar.gz podman-f6e36a64975fdd9c39507f4447a469de1e850598.tar.bz2 podman-f6e36a64975fdd9c39507f4447a469de1e850598.zip |
libpod: fix connection leak
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
-rw-r--r-- | libpod/oci_attach_linux.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libpod/oci_attach_linux.go b/libpod/oci_attach_linux.go index 1c15d567c..1ee664e81 100644 --- a/libpod/oci_attach_linux.go +++ b/libpod/oci_attach_linux.go @@ -273,9 +273,11 @@ func readStdio(conn *net.UnixConn, streams *define.AttachStreams, receiveStdoutE var err error select { case err = <-receiveStdoutError: + conn.CloseWrite() return err case err = <-stdinDone: if err == define.ErrDetach { + conn.CloseWrite() return err } if err == nil { |