Skip to content

Commit

Permalink
isofs: inode leak on mount failure
Browse files Browse the repository at this point in the history
d_alloc_root() failure leaves root inode leaked...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Jan 9, 2012
1 parent 0ce8c01 commit 8fdd8c4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fs/isofs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -948,8 +948,11 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent)

/* 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);

Expand Down

0 comments on commit 8fdd8c4

Please sign in to comment.