Commit 75b7de56 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] d_alloc_root() fixes: hfs

 - inode leak on d_alloc_root() failure
parent de659f42
......@@ -294,13 +294,15 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent)
sb->s_root = d_alloc_root(root_inode);
if (!sb->s_root)
goto bail_no_root;
goto bail_iput;
sb->s_root->d_op = &hfs_dentry_operations;
/* everything's okay */
return 0;
bail_iput:
iput(root_inode);
bail_no_root:
hfs_warn("hfs_fs: get root inode failed.\n");
hfs_mdb_put(sb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment