summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2022-01-14 13:12:26 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2022-01-24 16:05:42 +0100
commitf6e36a64975fdd9c39507f4447a469de1e850598 (patch)
tree6453a8b1c9517aa12d845b9fa1c13124bafd8c9a /libpod
parentb75d6baf074a61f2119b8619c86bd2fae1cb2833 (diff)
downloadpodman-f6e36a64975fdd9c39507f4447a469de1e850598.tar.gz
podman-f6e36a64975fdd9c39507f4447a469de1e850598.tar.bz2
podman-f6e36a64975fdd9c39507f4447a469de1e850598.zip
libpod: fix connection leak
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/oci_attach_linux.go2
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 {