mirror of
https://git.proxmox.com/git/mirror_zfs
synced 2025-04-27 21:27:26 +00:00
Fix memory leaks in pool properties handling
Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Richard Kojedzinszky <richard@kojedz.in> Closes #17208
This commit is contained in:
parent
78a7c78bdf
commit
09fc7bb47e
@ -85,6 +85,7 @@ zpool_get_all_props(zpool_handle_t *zhp)
|
||||
fnvlist_add_string_array(innvl, ZPOOL_GET_PROPS_NAMES,
|
||||
zhp->zpool_propnames, zhp->zpool_n_propnames);
|
||||
zcmd_write_src_nvlist(hdl, &zc, innvl);
|
||||
fnvlist_free(innvl);
|
||||
}
|
||||
|
||||
zcmd_alloc_dst_nvlist(hdl, &zc, 0);
|
||||
@ -332,7 +333,7 @@ zpool_get_prop(zpool_handle_t *zhp, zpool_prop_t prop, char *buf,
|
||||
*/
|
||||
if (prop == ZPOOL_PROP_DEDUPCACHED) {
|
||||
zpool_add_propname(zhp, ZPOOL_DEDUPCACHED_PROP_NAME);
|
||||
(void) zpool_get_all_props(zhp);
|
||||
(void) zpool_props_refresh(zhp);
|
||||
}
|
||||
|
||||
if (zhp->zpool_props == NULL && zpool_get_all_props(zhp) &&
|
||||
|
Loading…
Reference in New Issue
Block a user