mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 11:29:36 +03:00
Free property names with spa_strfree() rather than strfree()
Since they're allocated with spa_strdup(), they should be freed with spa_strfree() so the proper length buffer is freed. Reviewed-by: Richard Yao <ryao@gentoo.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tim Chase <tim@chase2k.com> Closes #5082 Closes #5086
This commit is contained in:
parent
bd296705d5
commit
20aa7a4e31
@ -261,7 +261,7 @@ dsl_prop_fini(dsl_dir_t *dd)
|
|||||||
|
|
||||||
while ((pr = list_remove_head(&dd->dd_props)) != NULL) {
|
while ((pr = list_remove_head(&dd->dd_props)) != NULL) {
|
||||||
list_destroy(&pr->pr_cbs);
|
list_destroy(&pr->pr_cbs);
|
||||||
strfree((char *)pr->pr_propname);
|
spa_strfree((char *)pr->pr_propname);
|
||||||
kmem_free(pr, sizeof (dsl_prop_record_t));
|
kmem_free(pr, sizeof (dsl_prop_record_t));
|
||||||
}
|
}
|
||||||
list_destroy(&dd->dd_props);
|
list_destroy(&dd->dd_props);
|
||||||
|
Loading…
Reference in New Issue
Block a user