summaryrefslogtreecommitdiff
path: root/drivers/watchdog/txx9wdt.c
diff options
context:
space:
mode:
authorWang Hai <wanghai38@huawei.com>2020-06-15 06:25:33 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-21 10:48:13 +0300
commit2f0bd77337c2810271c04ab09a9b5154e9fa2188 (patch)
treefe40070970c20b94d68c47587162a639ef2753eb /drivers/watchdog/txx9wdt.c
parent4ac2e3425382667ceb957d0837c81e81dc02a2dc (diff)
downloadlinux-2f0bd77337c2810271c04ab09a9b5154e9fa2188.tar.xz
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/watchdog/txx9wdt.c')
0 files changed, 0 insertions, 0 deletions