1
0
Fork 0

ext4: Fix null bh pointer dereference in mballoc

Repoted by Adrian Bunk <bunk@kernel.org>:

The Coverity checker spotted the following NULL dereference:

static int ext4_mb_mark_diskspace_used
{
	...
	if (!bitmap_bh)
		goto out_err;
	...
out_err:
	sb->s_dirt = 1;
	put_bh(bitmap_bh);
	...

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
hifive-unleashed-5.1
Aneesh Kumar K.V 2008-02-10 01:07:28 -05:00 committed by Theodore Ts'o
parent b8356c465b
commit 42a10add85
1 changed files with 1 additions and 1 deletions

View File

@ -3069,7 +3069,7 @@ static int ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
out_err:
sb->s_dirt = 1;
put_bh(bitmap_bh);
brelse(bitmap_bh);
return err;
}