commit | 256249584bda1a9357e2d29987a37f5b2df035f6 | [log] [tgz] |
---|---|---|
author | Al Viro <viro@zeniv.linux.org.uk> | Sun Jul 04 12:23:11 2010 +0400 |
committer | Al Viro <viro@zeniv.linux.org.uk> | Mon Aug 09 16:47:28 2010 -0400 |
tree | 266fa8425efb96dcb484e7fceb3a2d68610a1ba1 | |
parent | 0e4f6a791b1e8cfde75a74e2f885642ecb3fe9d8 [diff] [blame] |
fix leak in __logfs_create() 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>
diff --git a/fs/logfs/dir.c b/fs/logfs/dir.c index 72d1893..675cc49 100644 --- a/fs/logfs/dir.c +++ b/fs/logfs/dir.c
@@ -434,8 +434,11 @@ 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;