Skip to content

Commit

Permalink
xz: Landlock: Fix a file descriptor leak
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Wielaard authored and Larhzu committed Nov 25, 2024
1 parent dbca3d0 commit 48ff3f0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/xz/sandbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 48ff3f0

Please sign in to comment.