From 20aa7a4e319ddf53e4e2dcc5fa9b3b1645e982e3 Mon Sep 17 00:00:00 2001 From: Tim Chase Date: Sat, 10 Sep 2016 10:16:13 -0500 Subject: [PATCH] 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 Reviewed-by: Brian Behlendorf Signed-off-by: Tim Chase Closes #5082 Closes #5086 --- module/zfs/dsl_prop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);