| Submitter | Axel Lin |
|---|---|
| Date | June 30, 2011, 11:53 a.m. |
| Message ID | <1309434789.3256.1.camel@phoenix> |
| Download | mbox | patch |
| Permalink | /patch/102746/ |
| State | New |
| Headers | show
Return-Path: <linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 5FBE1B6F54 for <incoming@patchwork.ozlabs.org>; Thu, 30 Jun 2011 21:54:51 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QcFoz-0003jT-TE; Thu, 30 Jun 2011 11:54:14 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QcFoz-0000lQ-GH; Thu, 30 Jun 2011 11:54:13 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QcFow-0000l2-Cr for linux-mtd@canuck.infradead.org; Thu, 30 Jun 2011 11:54:10 +0000 Received: from mail-qy0-f177.google.com ([209.85.216.177]) by casper.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QcFou-0007xT-7A for linux-mtd@lists.infradead.org; Thu, 30 Jun 2011 11:54:08 +0000 Received: by qyk7 with SMTP id 7so1424289qyk.15 for <linux-mtd@lists.infradead.org>; Thu, 30 Jun 2011 04:53:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=WdPWQksXxlawYAtqaa1DqOIYA7iGwGyJR6slsprQKfg=; b=cF2GCt71dWRM88ZjfG6zDuzWOId3i9SX9KE0PhhIf6J9eArsGIiEh4vV0kFT9CmsuD v7U3pcgrhPSlTWxtqSN+DpiVWYQY69E4N8kztU0A0kF45BTmN+z01Ut/hei/nRT+Xo0B E6zAi8qs1d1DJrdGPKTu2GMf6tbIrBFPDkgNA= Received: by 10.229.136.144 with SMTP id r16mr1433712qct.153.1309434797402; Thu, 30 Jun 2011 04:53:17 -0700 (PDT) Received: from [218.172.224.133] (218-172-224-133.dynamic.hinet.net [218.172.224.133]) by mx.google.com with ESMTPS id v4sm1664387qca.28.2011.06.30.04.53.14 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 30 Jun 2011 04:53:16 -0700 (PDT) Subject: [PATCH] mtd: fsl_upm: fix a memory leak in fun_chip_init error path From: Axel Lin <axel.lin@gmail.com> To: linux-kernel@vger.kernel.org Date: Thu, 30 Jun 2011 19:53:09 +0800 Message-ID: <1309434789.3256.1.camel@phoenix> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110630_125408_450966_ED01A5BE X-CRM114-Status: GOOD ( 12.29 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2-r929478 on casper.infradead.org summary: Content analysis details: (-2.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.216.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (axel.lin[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 T_TO_NO_BRKTS_FREEMAIL T_TO_NO_BRKTS_FREEMAIL Cc: linux-mtd@lists.infradead.org, Anton Vorontsov <avorontsov@ru.mvista.com>, David Woodhouse <dwmw2@infradead.org>, Artem Bityutskiy <dedekind1@gmail.com> X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list <linux-mtd.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-mtd/> List-Post: <mailto:linux-mtd@lists.infradead.org> List-Help: <mailto:linux-mtd-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Comments
Patch
diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c index da92fed..b4f3cc9 100644 --- a/drivers/mtd/nand/fsl_upm.c +++ b/drivers/mtd/nand/fsl_upm.c @@ -196,6 +196,8 @@ static int __devinit fun_chip_init(struct fsl_upm_nand *fun, ret = mtd_device_parse_register(&fun->mtd, NULL, &ppdata, NULL, 0); err: of_node_put(flash_np); + if (ret) + kfree(fun->mtd.name); return ret; }
Signed-off-by: Axel Lin <axel.lin@gmail.com> --- drivers/mtd/nand/fsl_upm.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)