Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 41716c7c authored by Eric Sesterhenn's avatar Eric Sesterhenn Committed by Linus Torvalds
Browse files

[PATCH] null dereference in fs/jbd/journal.c



Since commit d1807793 we dereference a NULL
pointer.  Coverity id #1432.  We set journal to NULL, and use it directly
afterwards.

Signed-off-by: default avatarEric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7e491092
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
@@ -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;
}