Skip to content

Commit

Permalink
[PATCH] null dereference in fs/jbd/journal.c
Browse files Browse the repository at this point in the history
Since commit d180779 we dereference a NULL
pointer.  Coverity id #1432.  We set journal to NULL, and use it directly
afterwards.

Signed-off-by: Eric Sesterhenn <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
SesterhennEric authored and Linus Torvalds committed Oct 11, 2006
1 parent 7e49109 commit 41716c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/jbd/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,7 @@ journal_t * journal_init_dev(struct block_device *bdev,
__FUNCTION__);
kfree(journal);
journal = NULL;
goto out;
}
journal->j_dev = bdev;
journal->j_fs_dev = fs_dev;
Expand All @@ -735,7 +736,7 @@ journal_t * journal_init_dev(struct block_device *bdev,
J_ASSERT(bh != NULL);
journal->j_sb_buffer = bh;
journal->j_superblock = (journal_superblock_t *)bh->b_data;

out:
return journal;
}

Expand Down

0 comments on commit 41716c7

Please sign in to comment.