aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/arc.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2018-09-26 09:50:58 -0700
committerGitHub <[email protected]>2018-09-26 09:50:58 -0700
commit7a23c81342df05ace730bd303b4a73854dba43dd (patch)
tree39569e47af4b369c9813aca12dd8ff72a3a1e481 /module/zfs/arc.c
parentb954e36e512171d94637c709023e4d763b655d91 (diff)
Fix small sysfs leak
When zfs_kobj_init() is called with an attr_cnt of 0 only the kobj->zko_default_attrs is allocated. It subsequently won't get freed in zfs_kobj_release since the free is wrapped in a kobj->zko_attr_count != 0 conditional. Split the block in zfs_kobj_release() to make sure the kobj->zko_default_attrs are freed in this case. Additionally, fix a minor spelling mistake and typo in zfs_kobj_init() which could also cause a leak but in practice is almost certain not to fail. Reviewed-by: Richard Elling <[email protected]> Reviewed-by: Tim Chase <[email protected]> Reviewed-by: John Gallagher <[email protected]> Reviewed-by: Don Brady <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #7957
Diffstat (limited to 'module/zfs/arc.c')
0 files changed, 0 insertions, 0 deletions