diff options
| author | Wang Hai <wanghai38@huawei.com> | 2020-06-15 11:25:33 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-08-21 10:53:02 +0200 |
| commit | a8c53fed7047e3c59c077385b42b84d1562d7315 (patch) | |
| tree | cfd166cf18b194e412db4a797406ff53b2dc5929 /drivers/net/wan/lapbether.c | |
| parent | 80533d2527d42632324e77965cd24d6b3fb8395f (diff) | |
dlm: Fix kobject memleak
[ Upstream commit 0ffddafc3a3970ef7013696e7f36b3d378bc4c16 ]
Currently the error return path from kobject_init_and_add() is not
followed by a call to kobject_put() - which means we are leaking
the kobject.
Set do_unreg = 1 before kobject_init_and_add() to ensure that
kobject_put() can be called in its error patch.
Fixes: 901195ed7f4b ("Kobject: change GFS2 to use kobject_init_and_add")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/net/wan/lapbether.c')
0 files changed, 0 insertions, 0 deletions
