Commit b921bc08 authored by Alexander Nyberg's avatar Alexander Nyberg Committed by Linus Torvalds

[PATCH] ext3_new_inode() failure handling missing check

There's a missing failure handling check here that would possibly lead to a
null dereference later on, I'm not sure about the correct return value
however.  I haven't tried it as I'm not sure how to trigger the case ;)

Found by the Coverity tool.
Signed-off-by: default avatarAlexander Nyberg <alexn@dsv.su.se>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 97ffe49f
...@@ -460,9 +460,12 @@ struct inode *ext3_new_inode(handle_t *handle, struct inode * dir, int mode) ...@@ -460,9 +460,12 @@ struct inode *ext3_new_inode(handle_t *handle, struct inode * dir, int mode)
goto out; goto out;
for (i = 0; i < sbi->s_groups_count; i++) { for (i = 0; i < sbi->s_groups_count; i++) {
err = -EIO;
gdp = ext3_get_group_desc(sb, group, &bh2); gdp = ext3_get_group_desc(sb, group, &bh2);
if (!gdp)
goto fail;
err = -EIO;
brelse(bitmap_bh); brelse(bitmap_bh);
bitmap_bh = read_inode_bitmap(sb, group); bitmap_bh = read_inode_bitmap(sb, group);
if (!bitmap_bh) if (!bitmap_bh)
......
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