projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e4f6a7
)
fix leak in __logfs_create()
author
Al Viro
<viro@zeniv.linux.org.uk>
Sun, 4 Jul 2010 08:23:11 +0000
(12:23 +0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Mon, 9 Aug 2010 20:47:28 +0000
(16:47 -0400)
if kmalloc fails, we still need to drop the inode, as we do
on other failure exits.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/logfs/dir.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/logfs/dir.c
b/fs/logfs/dir.c
index 72d1893ddd360ccf144cf962c4e2f05f9a136638..675cc49197feb177bcb67e0f0aefa66deed9cabd 100644
(file)
--- a/
fs/logfs/dir.c
+++ b/
fs/logfs/dir.c
@@
-434,8
+434,11
@@
static int __logfs_create(struct inode *dir, struct dentry *dentry,
int ret;
ta = kzalloc(sizeof(*ta), GFP_KERNEL);
- if (!ta)
+ if (!ta) {
+ inode->i_nlink--;
+ iput(inode);
return -ENOMEM;
+ }
ta->state = CREATE_1;
ta->ino = inode->i_ino;