mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2024-12-12 23:08:11 +00:00
[PATCH] sysfs: fix a kobject leak in sysfs_add_link on the error path
As pointed out by Oliver Neukum. Cc: Maneesh Soni <maneesh@in.ibm.com> Cc: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
832c57e9af
commit
b3229087c5
@ -66,6 +66,7 @@ static int sysfs_add_link(struct dentry * parent, const char * name, struct kobj
|
||||
if (!error)
|
||||
return 0;
|
||||
|
||||
kobject_put(target);
|
||||
kfree(sl->link_name);
|
||||
exit2:
|
||||
kfree(sl);
|
||||
|
Loading…
Reference in New Issue
Block a user