isofs: inode leak on mount failure
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 9 Jan 2012 15:48:11 +0000 (10:48 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 9 Jan 2012 15:48:11 +0000 (10:48 -0500)
d_alloc_root() failure leaves root inode leaked...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/isofs/inode.c

index 7b99f5f460be1bfeab87c80e01bec6cb2870f7ee..bd62c76fb5df8a08d8d11bdae311ecc8a3054039 100644 (file)
@@ -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);