Nanyong Sun 0f36028d01 nilfs2: fix memory leak in nilfs_sysfs_create_snapshot_group
[ Upstream commit b2fe39c248f3fa4bbb2a20759b4fdd83504190f7 ]

If kobject_init_and_add returns with error, kobject_put() is needed here
to avoid memory leak, because kobject_init_and_add may return error
without freeing the memory associated with the kobject it allocated.

Link: https://lkml.kernel.org/r/20210629022556.3985106-6-sunnanyong@huawei.com
Link: https://lkml.kernel.org/r/1625651306-10829-6-git-send-email-konishi.ryusuke@gmail.com
Signed-off-by: Nanyong Sun <sunnanyong@huawei.com>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-26 14:09:01 +02:00
..
2021-09-08 08:49:01 +02:00
2020-10-16 11:11:22 -07:00
2021-07-14 16:55:59 +02:00
2021-09-18 13:40:15 +02:00
2021-08-04 12:46:40 +02:00
2021-07-14 16:56:12 +02:00
2020-09-10 14:03:31 -07:00
2020-08-04 21:02:38 -04:00
2020-07-31 08:16:01 +02:00
2020-10-23 11:33:41 -07:00
2020-10-23 11:33:41 -07:00
2020-10-24 12:40:18 -07:00
2020-08-27 16:06:47 -04:00
2020-07-31 08:16:01 +02:00