From: Shreenidhi Shedi Date: Sat, 4 Jun 2022 09:54:08 +0000 (+0530) Subject: execute: fix resource leak X-Git-Tag: v252-rc1~865 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41abd7f6dfe09ccc78cdbdcdec3bdcc10be40faf;p=thirdparty%2Fsystemd.git execute: fix resource leak CID#1431998 --- diff --git a/src/core/execute.c b/src/core/execute.c index 581c64480ea..05fc00ca1ce 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -3537,7 +3537,7 @@ static int apply_mount_namespace( /* Symlinks for exec dirs are set up after other mounts, before they are made read-only. */ r = compile_symlinks(context, params, &symlinks); if (r < 0) - return r; + goto finalize; needs_sandboxing = (params->flags & EXEC_APPLY_SANDBOXING) && !(command_flags & EXEC_COMMAND_FULLY_PRIVILEGED); if (needs_sandboxing) {