summaryrefslogtreecommitdiff
path: root/libpod/oci_conmon_exec_linux.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2022-01-14 13:13:04 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2022-01-24 16:05:46 +0100
commit75e6994d4edc712a281aaa46574ed90ecd19ba49 (patch)
treef856b1d7bc0d3589629efa362a27cd7ad1325d8e /libpod/oci_conmon_exec_linux.go
parentf6e36a64975fdd9c39507f4447a469de1e850598 (diff)
downloadpodman-75e6994d4edc712a281aaa46574ed90ecd19ba49.tar.gz
podman-75e6994d4edc712a281aaa46574ed90ecd19ba49.tar.bz2
podman-75e6994d4edc712a281aaa46574ed90ecd19ba49.zip
libpod: fix leaking fd
the config.json file for the OCI runtime is never closed, this is a problem when running on NFS, since it leaves around stale files that cannot be unlinked. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod/oci_conmon_exec_linux.go')
-rw-r--r--libpod/oci_conmon_exec_linux.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/libpod/oci_conmon_exec_linux.go b/libpod/oci_conmon_exec_linux.go
index 29c600109..04deaac83 100644
--- a/libpod/oci_conmon_exec_linux.go
+++ b/libpod/oci_conmon_exec_linux.go
@@ -389,6 +389,7 @@ func (r *ConmonOCIRuntime) startExec(c *Container, sessionID string, options *Ex
if err != nil {
return nil, nil, err
}
+ defer processFile.Close()
args := r.sharedConmonArgs(c, sessionID, c.execBundlePath(sessionID), c.execPidPath(sessionID), c.execLogPath(sessionID), c.execExitFileDir(sessionID), ociLog, define.NoLogging, "")