diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-16 23:44:26 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-20 21:42:59 (GMT) |
commit | b3229087c5e08589cea4f5040dab56f7dc11332a (patch) | |
tree | 5a9568e4d041370b453f6074015ff1081a045c26 | |
parent | 832c57e9afa7a263bb2f8ee6d04d527ef6709aae (diff) | |
download | linux-b3229087c5e08589cea4f5040dab56f7dc11332a.tar.xz |
[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>
-rw-r--r-- | fs/sysfs/symlink.c | 1 |
1 files changed, 1 insertions, 0 deletions
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 @@ 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); |