diff options
author | Miaoqian Lin <linmq006@gmail.com> | 2022-01-20 12:18:12 +0000 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2022-01-21 22:48:54 +0100 |
commit | d24846a4246b6e61ecbd036880a4adf61681d241 (patch) | |
tree | 28a9b63bb9fcc2149ab373d19380fb57464baf08 /Documentation | |
parent | 30f308999426871e1b896384093e9a681099f521 (diff) | |
download | lwn-d24846a4246b6e61ecbd036880a4adf61681d241.tar.gz lwn-d24846a4246b6e61ecbd036880a4adf61681d241.zip |
parisc: pdc_stable: Fix memory leak in pdcs_register_pathentries
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>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions