From: Dan Carpenter Date: Wed, 1 Apr 2009 18:05:04 +0000 (+0000) Subject: ext4: fix typo which causes a memory leak on error path X-Git-Tag: v2.6.29.2~93 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45b143c7050b475a911d6a3bf587ae72d075b0c5;p=thirdparty%2Fkernel%2Fstable.git ext4: fix typo which causes a memory leak on error path upstream commit: a7b19448ddbdc34b2b8fedc048ba154ca798667b 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 Signed-off-by: Chris Wright --- diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 9f61e62f435f6..87972a3d46c82 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -2693,7 +2693,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; }