diff options
author | Richard Yao <[email protected]> | 2022-09-23 19:55:26 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2022-09-23 16:55:26 -0700 |
commit | ebe1d0361671c80025d5be2c31131ed223115873 (patch) | |
tree | 04f6b7e5a3af21a543afe7d4afa4465908cd4a29 /lib/libzfs | |
parent | 2a493a4c7127258b14c39e8c71a9d6f01167c5cd (diff) |
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 <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Richard Yao <[email protected]>
Closes #13921
Diffstat (limited to 'lib/libzfs')
-rw-r--r-- | lib/libzfs/libzfs_dataset.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c index 047a25488..29798af03 100644 --- a/lib/libzfs/libzfs_dataset.c +++ b/lib/libzfs/libzfs_dataset.c @@ -2007,6 +2007,7 @@ zfs_prop_inherit(zfs_handle_t *zhp, const char *propname, boolean_t received) goto error; if ((ret = zfs_ioctl(zhp->zfs_hdl, ZFS_IOC_INHERIT_PROP, &zc)) != 0) { + changelist_free(cl); return (zfs_standard_error(hdl, errno, errbuf)); } else { |