Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3229087 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

[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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 832c57e9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);