mirror of
https://git.tukaani.org/xz.git
synced 2025-03-01 14:10:47 +00:00
xz: Landlock: Fix a file descriptor leak
(cherry picked from commit 48ff3f06521ca326996ab9a04d1b342098960427)
This commit is contained in:
parent
77cab41f32
commit
d9c2e7572b
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user