summaryrefslogtreecommitdiffstats
path: root/fs/isofs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-01-09 10:48:11 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-01-09 10:48:11 -0500
commit8fdd8c49fe50394fef3e193db27222cb03c2b212 (patch)
tree24b13a4397127a7ac8d708af9af6e1f476bc0763 /fs/isofs
parent0ce8c0109f548ed75535d96ec5a347b410ed1472 (diff)
downloadlinux-stable-8fdd8c49fe50394fef3e193db27222cb03c2b212.tar.gz
linux-stable-8fdd8c49fe50394fef3e193db27222cb03c2b212.tar.bz2
linux-stable-8fdd8c49fe50394fef3e193db27222cb03c2b212.zip
isofs: inode leak on mount failure
d_alloc_root() failure leaves root inode leaked... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/isofs')
-rw-r--r--fs/isofs/inode.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c
index 7b99f5f460be..bd62c76fb5df 100644
--- a/fs/isofs/inode.c
+++ b/fs/isofs/inode.c
@@ -948,8 +948,11 @@ root_found:
/* get the root dentry */
s->s_root = d_alloc_root(inode);
- if (!(s->s_root))
- goto out_no_root;
+ if (!(s->s_root)) {
+ iput(inode);
+ error = -ENOMEM;
+ goto out_no_inode;
+ }
kfree(opt.iocharset);