commit | b3229087c5e08589cea4f5040dab56f7dc11332a | [log] [tgz] |
---|---|---|
author | Greg Kroah-Hartman <gregkh@suse.de> | Thu Mar 16 15:44:26 2006 -0800 |
committer | Greg Kroah-Hartman <gregkh@suse.de> | Mon Mar 20 13:42:59 2006 -0800 |
tree | 5a9568e4d041370b453f6074015ff1081a045c26 | |
parent | 832c57e9afa7a263bb2f8ee6d04d527ef6709aae [diff] [blame] |
[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>
diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c index fe23f47..d2eac3c 100644 --- a/fs/sysfs/symlink.c +++ b/fs/sysfs/symlink.c
@@ -66,6 +66,7 @@ if (!error) return 0; + kobject_put(target); kfree(sl->link_name); exit2: kfree(sl);