]> granicus.if.org Git - zfs/commit
Fix dsl_prop_get_all_dsl() memory leak
authorBearBabyLiu <liu.huang@zte.com.cn>
Wed, 2 Nov 2016 19:34:10 +0000 (03:34 +0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 2 Nov 2016 19:34:10 +0000 (12:34 -0700)
commit6d4210052be6c63032d693aa487f84955b0dae44
tree67cfc89728b3f6855ee5f18f0bf15845f7c3f74b
parente676a196249b5e8d23c036548f189cad60d5cd2a
Fix dsl_prop_get_all_dsl() memory leak

On error dsl_prop_get_all_ds() does not free the nvlist it allocates.
This behavior may have been intentional when originally written
but is atypical and often confusing.  Since no callers rely on this
behavior the function has been updated to always free the nvlist
on error.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: BearBabyLiu <liu.huang@zte.com.cn>
Closes #5320
module/zfs/dsl_prop.c
module/zfs/zfs_ioctl.c