Browse Source

isofs: inode leak on mount failure

d_alloc_root() failure leaves root inode leaked...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro 13 years ago
parent
commit
8fdd8c49fe
1 changed files with 5 additions and 2 deletions
  1. 5 2
      fs/isofs/inode.c

+ 5 - 2
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);