]> granicus.if.org Git - zfs/commitdiff
Free property names with spa_strfree() rather than strfree()
authorTim Chase <tim@chase2k.com>
Sat, 10 Sep 2016 15:16:13 +0000 (10:16 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 12 Sep 2016 16:45:26 +0000 (09:45 -0700)
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

module/zfs/dsl_prop.c

index 66e899a57118d23c6391d1354b1763d83e6a929c..24836000f3b0fd61bea6996d5237e3c3cd964b22 100644 (file)
@@ -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);