From patchwork Tue Jun 7 14:55:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 99220 Return-Path: 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 D5170B6F76 for ; Wed, 8 Jun 2011 00:56:06 +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 1QTxgy-0000TH-3P; Tue, 07 Jun 2011 14:55:40 +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 1QTxgx-0004l4-LX; Tue, 07 Jun 2011 14:55:39 +0000 Received: from mail-ey0-f177.google.com ([209.85.215.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QTxgu-0004kk-P4 for linux-mtd@lists.infradead.org; Tue, 07 Jun 2011 14:55:37 +0000 Received: by eyh6 with SMTP id 6so2121864eyh.36 for ; Tue, 07 Jun 2011 07:55:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:from:to:cc:content-type:date:message-id :mime-version:x-mailer:content-transfer-encoding; bh=TEWga+8B5jf9ZOTvkrGqMH74Lzi9fdiKQ6VhIBMQ+1o=; b=VZ+DkVg2P/5/zYbxBXc5wPxf7T3+HGuukNboWzB2OVMZJZW0g04V5oc6OwgQLaOxAF SofuuLVZBr8eVBPEtGnf4BfspSRxO6TIlSqtsATjHm/Uj0EveNfEfhhxAGggZDH+PJF3 GT+vNvco5UlyqSByb1VtnP8qzPWy8h84pg8Vk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=lPqf9pbMCT88wigwnL45uQjaeu4moVZNuanDNkCIj3lvMaxUFn8en933dd56DfeeyH jP3v3rskMxkXctdVa28jKAylNp/lrgswXBgX7S+E8QZ+ybsMbu5I0NM7nzuvhlDF9xiA 48TH/+tN1XlYi4dxGeooQb1c51pqA7q5Ek5Vw= Received: by 10.14.122.201 with SMTP id t49mr2292832eeh.25.1307458532416; Tue, 07 Jun 2011 07:55:32 -0700 (PDT) Received: from [218.167.73.37] (218-167-73-37.dynamic.hinet.net [218.167.73.37]) by mx.google.com with ESMTPS id y6sm3971512eem.4.2011.06.07.07.55.27 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 07 Jun 2011 07:55:30 -0700 (PDT) Subject: [PATCH] mtd: ndfc: fix a memory leak in ndfc_remove From: Axel Lin To: linux-kernel@vger.kernel.org Date: Tue, 07 Jun 2011 22:55:21 +0800 Message-ID: <1307458521.22584.1.camel@phoenix> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110607_105537_100246_4AFAD138 X-CRM114-Status: GOOD ( 11.99 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is freemail (axel.lin[at]gmail.com) -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 RFC_ABUSE_POST Both abuse and postmaster missing on sender domain 0.0 T_TO_NO_BRKTS_FREEMAIL T_TO_NO_BRKTS_FREEMAIL Cc: Artem Bityutskiy , David Woodhouse , linux-mtd@lists.infradead.org, Sean MacLennan X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Signed-off-by: Axel Lin --- drivers/mtd/nand/ndfc.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c index ea2dea8..7995470 100644 --- a/drivers/mtd/nand/ndfc.c +++ b/drivers/mtd/nand/ndfc.c @@ -288,6 +288,7 @@ static int __devexit ndfc_remove(struct platform_device *ofdev) struct ndfc_controller *ndfc = dev_get_drvdata(&ofdev->dev); nand_release(&ndfc->mtd); + kfree(ndfc->mtd.name); return 0; }