From 48ff3f06521ca326996ab9a04d1b342098960427 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Mon, 25 Nov 2024 12:28:44 +0200 Subject: [PATCH] xz: Landlock: Fix a file descriptor leak --- src/xz/sandbox.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/xz/sandbox.c b/src/xz/sandbox.c index 5bd22737..5a12f69b 100644 --- a/src/xz/sandbox.c +++ b/src/xz/sandbox.c @@ -196,6 +196,7 @@ enable_landlock(uint64_t required_rights) if (syscall(SYS_landlock_restrict_self, ruleset_fd, 0U) != 0) message_fatal(_("Failed to enable the sandbox")); + (void)close(ruleset_fd); return; }