systemd/0115-execute-fix-resource-leak.patch
Jan Macku 0daf48d9aa systemd-250-8
Resolves: #2047682,#2068043,#2068131,#2073003,#2073994,#2082131,#2083493,#2087652,#2100340
2022-07-20 08:37:23 +02:00

27 lines
965 B
Diff

From 08b6aa9dfbe9476ad71b48edd0f4454511d9ac19 Mon Sep 17 00:00:00 2001
From: Shreenidhi Shedi <sshedi@vmware.com>
Date: Sat, 4 Jun 2022 15:24:08 +0530
Subject: [PATCH] execute: fix resource leak
CID#1431998
(cherry picked from commit 41abd7f6dfe09ccc78cdbdcdec3bdcc10be40faf)
Related: #2087652
---
src/core/execute.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/execute.c b/src/core/execute.c
index 2ab65e9cfe..8a1d070e26 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -3331,7 +3331,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) {