diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-17 02:44:26 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-28 10:47:30 +0400 |
commit | 8513187b93ba2092688c99d529ff85864359b729 (patch) | |
tree | 0131378ecf86e4606fcff22712482e08397fe59d /fs | |
parent | 4dea21b262ea05825bffade2180e560b0141fd85 (diff) | |
download | linux-8513187b93ba2092688c99d529ff85864359b729.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>
Diffstat (limited to 'fs')
-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 e38d6338a20d..e5ce6e74f689 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); |