HomeFreeBSD

Fix userland resource leaks

Description

Fix userland resource leaks

Coverity caught these. With the exception of the file descriptor leak in
tests/zfs-tests/cmd/draid.c, they are all memory leaks.

Also, there is a piece of dead code in zfs_get_enclosure_sysfs_path().
We delete it as cleanup.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #13921

Details

Provenance
Richard Yao <richard.yao@alumni.stonybrook.edu>Authored on Sep 23 2022, 11:55 PM
GitHub <noreply@github.com>Committed on Sep 23 2022, 11:55 PM
Parents
rG2a493a4c7127: Fix unchecked return values and unused return values
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGebe1d0361671: Fix userland resource leaks (authored by Richard Yao <richard.yao@alumni.stonybrook.edu>).Sep 23 2022, 11:55 PM