From 75e6994d4edc712a281aaa46574ed90ecd19ba49 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Fri, 14 Jan 2022 13:13:04 +0100 Subject: 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 --- libpod/oci_conmon_exec_linux.go | 1 + 1 file changed, 1 insertion(+) (limited to 'libpod/oci_conmon_exec_linux.go') 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, "") -- cgit v1.2.3-54-g00ecf