Skip to content

Commit 5952fc1

Browse files
rkojedzinszkytonyhutter
authored andcommitted
Fix memory leaks in pool properties handling
Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Richard Kojedzinszky <[email protected]> Closes openzfs#17208
1 parent a486cac commit 5952fc1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/libzfs/libzfs_pool.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ zpool_get_all_props(zpool_handle_t *zhp)
8585
fnvlist_add_string_array(innvl, ZPOOL_GET_PROPS_NAMES,
8686
zhp->zpool_propnames, zhp->zpool_n_propnames);
8787
zcmd_write_src_nvlist(hdl, &zc, innvl);
88+
fnvlist_free(innvl);
8889
}
8990

9091
zcmd_alloc_dst_nvlist(hdl, &zc, 0);
@@ -332,7 +333,7 @@ zpool_get_prop(zpool_handle_t *zhp, zpool_prop_t prop, char *buf,
332333
*/
333334
if (prop == ZPOOL_PROP_DEDUPCACHED) {
334335
zpool_add_propname(zhp, ZPOOL_DEDUPCACHED_PROP_NAME);
335-
(void) zpool_get_all_props(zhp);
336+
(void) zpool_props_refresh(zhp);
336337
}
337338

338339
if (zhp->zpool_props == NULL && zpool_get_all_props(zhp) &&

0 commit comments

Comments
 (0)