]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
execute: fix resource leak
authorShreenidhi Shedi <sshedi@vmware.com>
Sat, 4 Jun 2022 09:54:08 +0000 (15:24 +0530)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 6 Jun 2022 14:34:37 +0000 (16:34 +0200)
CID#1431998

src/core/execute.c

index 581c64480ea081ebb06aad56a824d232679d5bbe..05fc00ca1ce56184555d8308184620bab362832f 100644 (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) {