https://github.com/torvalds/linux
Revision b9fba67b3806e21b98bd5a98dc3921a8e9b42d61 authored by Tobin C. Harding on 01 June 2019, 05:30:29 UTC, committed by Linus Torvalds on 01 June 2019, 22:51:31 UTC
If a call to kobject_init_and_add() fails we should call kobject_put() otherwise we leak memory. Add call to kobject_put() in the error path of call to kobject_init_and_add(). Please note, this has the side effect that the release method is called if kobject_init_and_add() fails. Link: http://lkml.kernel.org/r/20190513033458.2824-1-tobin@kernel.org Signed-off-by: Tobin C. Harding <tobin@kernel.org> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com> Cc: Mark Fasheh <mark@fasheh.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Junxiao Bi <junxiao.bi@oracle.com> Cc: Changwei Ge <gechangwei@live.cn> Cc: Gang He <ghe@suse.com> Cc: Jun Piao <piaojun@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 3e85899
Tip revision: b9fba67b3806e21b98bd5a98dc3921a8e9b42d61 authored by Tobin C. Harding on 01 June 2019, 05:30:29 UTC
ocfs2: fix error path kobject memory leak
ocfs2: fix error path kobject memory leak
Tip revision: b9fba67
File | Mode | Size |
---|---|---|
Kconfig | -rw-r--r-- | 2.7 KB |
Makefile | -rw-r--r-- | 457 bytes |
addr.c | -rw-r--r-- | 3.9 KB |
addr.h | -rw-r--r-- | 654 bytes |
atm_misc.c | -rw-r--r-- | 2.6 KB |
atm_sysfs.c | -rw-r--r-- | 4.2 KB |
br2684.c | -rw-r--r-- | 22.8 KB |
clip.c | -rw-r--r-- | 22.0 KB |
common.c | -rw-r--r-- | 21.4 KB |
common.h | -rw-r--r-- | 1.6 KB |
ioctl.c | -rw-r--r-- | 8.9 KB |
lec.c | -rw-r--r-- | 59.7 KB |
lec.h | -rw-r--r-- | 5.1 KB |
lec_arpc.h | -rw-r--r-- | 3.0 KB |
mpc.c | -rw-r--r-- | 38.2 KB |
mpc.h | -rw-r--r-- | 1.9 KB |
mpoa_caches.c | -rw-r--r-- | 14.2 KB |
mpoa_caches.h | -rw-r--r-- | 3.1 KB |
mpoa_proc.c | -rw-r--r-- | 7.2 KB |
pppoatm.c | -rw-r--r-- | 15.3 KB |
proc.c | -rw-r--r-- | 9.6 KB |
protocols.h | -rw-r--r-- | 418 bytes |
pvc.c | -rw-r--r-- | 3.8 KB |
raw.c | -rw-r--r-- | 1.9 KB |
resources.c | -rw-r--r-- | 9.9 KB |
resources.h | -rw-r--r-- | 1.0 KB |
signaling.c | -rw-r--r-- | 6.2 KB |
signaling.h | -rw-r--r-- | 877 bytes |
svc.c | -rw-r--r-- | 16.0 KB |
Computing file changes ...