提交 b3229087 编写于 作者: G Greg Kroah-Hartman

[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: NGreg Kroah-Hartman <gregkh@suse.de>
上级 832c57e9
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册