Brian Behlendorf 7a23c81342
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 <Richard.Elling@RichardElling.com>
Reviewed-by: Tim Chase <tim@chase2k.com>
Reviewed-by: John Gallagher <john.gallagher@delphix.com>
Reviewed-by: Don Brady <don.brady@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #7957
2018-09-26 09:50:58 -07:00
..
2018-05-29 16:00:33 -07:00
2015-01-16 14:41:26 -08:00
2017-08-14 10:36:48 -07:00
2017-06-26 14:36:49 -07:00
2018-05-29 16:00:33 -07:00
2018-08-31 10:16:54 -07:00
2018-05-29 16:00:33 -07:00
2018-05-29 16:00:33 -07:00
2018-05-01 11:24:20 -07:00
2018-09-05 18:33:36 -07:00
2018-08-15 09:53:44 -07:00
2018-08-27 10:16:01 -07:00
2018-05-29 16:00:33 -07:00
2018-09-05 18:33:36 -07:00
2018-08-02 10:21:48 -07:00
2018-08-02 10:21:48 -07:00
2018-05-29 16:00:33 -07:00
2018-05-29 16:00:33 -07:00
2018-05-29 16:00:33 -07:00
2017-10-11 16:54:48 -04:00
2015-01-16 14:41:26 -08:00
2018-09-05 18:33:36 -07:00
2018-05-29 16:00:33 -07:00
2018-05-29 16:00:33 -07:00
2018-05-29 16:00:33 -07:00
2018-03-15 10:53:58 -07:00
2017-01-03 11:31:18 -06:00
2018-07-11 13:10:40 -07:00
2018-03-15 10:53:58 -07:00
2010-08-31 13:41:58 -07:00
2018-05-29 16:00:33 -07:00
2018-09-12 18:14:42 -07:00
2018-08-27 10:16:01 -07:00
2018-05-29 16:00:33 -07:00
2018-09-05 18:33:36 -07:00
2016-11-29 14:34:33 -08:00
2018-09-05 18:33:36 -07:00
2018-09-05 18:33:36 -07:00
2018-05-29 16:00:33 -07:00
2018-09-05 18:33:36 -07:00
2018-05-29 16:00:33 -07:00
2018-05-29 16:00:33 -07:00
2018-05-29 16:00:33 -07:00
2018-09-05 18:33:36 -07:00
2018-05-29 16:00:33 -07:00
2018-05-29 16:00:33 -07:00
2018-05-29 16:00:33 -07:00
2018-05-29 16:00:33 -07:00
2018-02-13 14:54:54 -08:00
2018-09-26 09:50:58 -07:00
2018-05-29 16:00:33 -07:00
2018-05-29 16:00:33 -07:00
2018-09-05 18:33:36 -07:00
2018-02-09 10:08:05 -08:00
2018-08-27 10:04:21 -07:00
2018-05-29 16:00:33 -07:00