Commit 1c779e42 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] reiserfs: cleanup_bitmap_list() check for NULL argument.

From: Nikita Danilov <Nikita@Namesys.COM>

fs/reiserfs/journal.c:cleanup_bitmap_list() can be called to cleanup
reiserfs_list_bitmap that was only partly initialized. Check that
jb->bitmaps array was actually allocated, before trying to free its
elements.
parent 8283a979
......@@ -193,6 +193,9 @@ static int set_bit_in_list_bitmap(struct super_block *p_s_sb, int block,
static void cleanup_bitmap_list(struct super_block *p_s_sb,
struct reiserfs_list_bitmap *jb) {
int i;
if (jb->bitmaps == NULL)
return;
for (i = 0 ; i < SB_BMAP_NR(p_s_sb) ; i++) {
if (jb->bitmaps[i]) {
free_bitmap_node(p_s_sb, jb->bitmaps[i]) ;
......
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