HomeFreeBSD

libzfs: zfs_userns: Don't leak the namespace fd

Description

libzfs: zfs_userns: Don't leak the namespace fd

zfs_userns opens a file descriptor for the kernel to look up a
namespace, but does not close it.

Close the fd when we're done with it.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Allan Jude <allan@klarasystems.com>
Signed-off-by: Ryan Moeller <freqlabs@FreeBSD.org>
Closes #13554

Details

Provenance
freqlabsAuthored on Jun 13 2022, 8:24 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jun 14 2022, 3:13 PM
Parents
rG482505fd4219: Add weekly and monthly systemd timers for trimming
Branches
Unknown
Tags
Unknown

Event Timeline