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:
Tim Chase 2016-09-10 10:16:13 -05:00 committed by Brian Behlendorf
parent bd296705d5
commit 20aa7a4e31

View File

@ -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);