diff options
author | Wang Hai <wanghai38@huawei.com> | 2020-06-15 11:25:33 +0800 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2020-08-06 10:30:49 -0500 |
commit | 0ffddafc3a3970ef7013696e7f36b3d378bc4c16 (patch) | |
tree | 5d38247952bdb7f8b7ee9a380f663f6a4f0b40d4 /include/net | |
parent | 48778464bb7d346b47157d21ffde2af6b2d39110 (diff) | |
download | lwn-0ffddafc3a3970ef7013696e7f36b3d378bc4c16.tar.gz lwn-0ffddafc3a3970ef7013696e7f36b3d378bc4c16.zip |
dlm: Fix kobject memleak
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>
Diffstat (limited to 'include/net')
0 files changed, 0 insertions, 0 deletions