execute: fix resource leak

CID#1431998
This commit is contained in:
Shreenidhi Shedi 2022-06-04 15:24:08 +05:30 committed by Zbigniew Jędrzejewski-Szmek
parent 369151c9c7
commit 41abd7f6df

View file

@ -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) {