From: Greg KH Subject: [patch 52/60] ext4: fix typo which causes a memory leak on error path Date: Tue, 09 Jun 2009 17:14:20 -0700 Message-ID: <20090610002351.682737460@blue.kroah.org> References: <20090610001328.251476848@blue.kroah.org> Cc: Justin Forbes , Zwane Mwaikambo , Theodore Ts'o , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , Willy Tarreau , Rodrigo Rubira Branco , Jake Edge , Eugene Teo , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Chris Wright , linux-ext4@vger.kernel.org, Dan Carpenter , Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@kernel.org Return-path: Received: from kroah.org ([198.145.64.141]:57453 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757797AbZFJDgt (ORCPT ); Tue, 9 Jun 2009 23:36:49 -0400 Content-Disposition: inline; filename=ext4-fix-typo-which-causes-a-memory-leak-on-error-path.patch In-Reply-To: <20090610032135.GA19346@kroah.com> Sender: linux-ext4-owner@vger.kernel.org List-ID: -stable review patch. If anyone has any objections, please let us know. ------------------ From: Dan Carpenter 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 Signed-off-by: Greg Kroah-Hartman --- fs/ext4/mballoc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -2698,7 +2698,7 @@ int ext4_mb_init(struct super_block *sb, sbi->s_mb_maxs = kmalloc(i, GFP_KERNEL); if (sbi->s_mb_maxs == NULL) { clear_opt(sbi->s_mount_opt, MBALLOC); - kfree(sbi->s_mb_maxs); + kfree(sbi->s_mb_offsets); return -ENOMEM; }