From: Dan Carpenter Date: Fri, 27 Mar 2009 23:42:54 +0000 (-0400) Subject: ext4: fix typo which causes a memory leak on error path X-Git-Tag: v2.6.30-rc1~416^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a7b19448ddbdc34b2b8fedc048ba154ca798667b;p=profile%2Fivi%2Fkernel-x86-ivi.git ext4: fix typo which causes a memory leak on error path This was found by smatch (http://repo.or.cz/w/smatch.git/) Signed-off-by: Dan Carpenter Signed-off-by: "Theodore Ts'o" Cc: stable@kernel.org --- diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 7f6fc41..5f3e3a3 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -2699,7 +2699,7 @@ int ext4_mb_init(struct super_block *sb, int needs_recovery) i = (sb->s_blocksize_bits + 2) * sizeof(unsigned int); sbi->s_mb_maxs = kmalloc(i, GFP_KERNEL); if (sbi->s_mb_maxs == NULL) { - kfree(sbi->s_mb_maxs); + kfree(sbi->s_mb_offsets); return -ENOMEM; }