mirror of https://git.tukaani.org/xz.git
xz: Landlock: Fix a file descriptor leak
This commit is contained in:
parent
dbca3d078e
commit
48ff3f0652
|
@ -196,6 +196,7 @@ enable_landlock(uint64_t required_rights)
|
||||||
if (syscall(SYS_landlock_restrict_self, ruleset_fd, 0U) != 0)
|
if (syscall(SYS_landlock_restrict_self, ruleset_fd, 0U) != 0)
|
||||||
message_fatal(_("Failed to enable the sandbox"));
|
message_fatal(_("Failed to enable the sandbox"));
|
||||||
|
|
||||||
|
(void)close(ruleset_fd);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue