mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[PATCH] sysfs: fix a kobject leak in sysfs_add_link on the error path
As pointed out by Oliver Neukum. Cc: Maneesh Soni <[email protected]> Cc: Oliver Neukum <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
832c57e9af
commit
b3229087c5
1 changed files with 1 additions and 0 deletions
|
|
@ -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 a new issue