projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
nilfs2: fix memory leak in nilfs_sysfs_create_##name##_group
[linux-2.6-microblaze.git]
/
fs
/
nilfs2
/
sysfs.c
diff --git
a/fs/nilfs2/sysfs.c
b/fs/nilfs2/sysfs.c
index
ec85ac5
..
6305e4e
100644
(file)
--- a/
fs/nilfs2/sysfs.c
+++ b/
fs/nilfs2/sysfs.c
@@
-79,8
+79,8
@@
static int nilfs_sysfs_create_##name##_group(struct the_nilfs *nilfs) \
err = kobject_init_and_add(kobj, &nilfs_##name##_ktype, parent, \
#name); \
if (err) \
-
return err
; \
- return
0
; \
+
kobject_put(kobj)
; \
+ return
err
; \
} \
static void nilfs_sysfs_delete_##name##_group(struct the_nilfs *nilfs) \
{ \