summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Chase <[email protected]>2016-09-10 10:16:13 -0500
committerBrian Behlendorf <[email protected]>2016-09-12 09:45:26 -0700
commit20aa7a4e319ddf53e4e2dcc5fa9b3b1645e982e3 (patch)
treea8403133e66f6e1364224636ed3c24c4cb256025
parentbd296705d5b6a8d3fb03d93cb2e341ea04c3809f (diff)
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 <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tim Chase <[email protected]> Closes #5082 Closes #5086
-rw-r--r--module/zfs/dsl_prop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/dsl_prop.c b/module/zfs/dsl_prop.c
index 66e899a57..24836000f 100644
--- a/module/zfs/dsl_prop.c
+++ b/module/zfs/dsl_prop.c
@@ -261,7 +261,7 @@ dsl_prop_fini(dsl_dir_t *dd)
while ((pr = list_remove_head(&dd->dd_props)) != NULL) {
list_destroy(&pr->pr_cbs);
- strfree((char *)pr->pr_propname);
+ spa_strfree((char *)pr->pr_propname);
kmem_free(pr, sizeof (dsl_prop_record_t));
}
list_destroy(&dd->dd_props);