summaryrefslogtreecommitdiff
path: root/net/unix/garbage.c
diff options
context:
space:
mode:
authorMiaoqian Lin <linmq006@gmail.com>2022-01-20 12:18:12 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-01-27 08:46:20 +0100
commit5437a1e9bb05b90d19604c0da2f5689142b557ec (patch)
treecec194386c8702d70e8358ffe03a4bc4cd720a04 /net/unix/garbage.c
parent047d4ae46bc4c072f354b78760be640f1847e98b (diff)
parisc: pdc_stable: Fix memory leak in pdcs_register_pathentries
commit d24846a4246b6e61ecbd036880a4adf61681d241 upstream. kobject_init_and_add() takes reference even when it fails. According to the doc of kobject_init_and_add(): If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Fix memory leak by calling kobject_put(). Fixes: 73f368cf679b ("Kobject: change drivers/parisc/pdc_stable.c to use kobject_init_and_add") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/unix/garbage.c')
0 files changed, 0 insertions, 0 deletions