Tobin C. Harding fbcde197e1 gfs2: Fix error path kobject memory leak
If a call to kobject_init_and_add() fails we must call kobject_put()
otherwise we leak memory.

Function gfs2_sys_fs_add always calls kobject_init_and_add() which
always calls kobject_init().

It is safe to leave object destruction up to the kobject release
function and never free it manually.

Remove call to kfree() and always call kobject_put() in the error path.

Signed-off-by: Tobin C. Harding <tobin@kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-05-13 15:43:01 -07:00
..
2016-05-12 22:28:05 -04:00
2018-07-02 16:27:17 +01:00
2016-06-27 09:47:09 -05:00
2016-06-27 09:47:08 -05:00
2019-02-24 08:20:17 -07:00
2019-05-07 23:39:15 +02:00
2019-03-06 07:00:43 -07:00
2019-04-06 10:48:35 -06:00
2019-05-07 23:39:15 +02:00
2019-05-07 23:39:14 +02:00
2019-05-07 23:39:15 +02:00
2018-10-12 07:31:21 -05:00
2018-03-08 09:26:20 -07:00
2019-05-07 23:39:15 +02:00
2019-05-07 23:39:15 +02:00
2019-05-07 23:39:15 +02:00
2019-05-13 15:43:01 -07:00
2012-01-11 09:23:05 +00:00
2015-12-06 21:25:17 -05:00