From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>,
David Woodhouse <dwmw2@infradead.org>,
linux-mtd@lists.infradead.org,
Sean MacLennan <smaclennan@pikatech.com>
Subject: [PATCH] mtd: ndfc: fix a memory leak in ndfc_remove
Date: Tue, 07 Jun 2011 22:55:21 +0800 [thread overview]
Message-ID: <1307458521.22584.1.camel@phoenix> (raw)
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
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;
}
--
1.7.4.1
WARNING: multiple messages have this Message-ID (diff)
From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: David Woodhouse <dwmw2@infradead.org>,
Artem Bityutskiy <Artem.Bityutskiy@nokia.com>,
Sean MacLennan <smaclennan@pikatech.com>,
linux-mtd@lists.infradead.org
Subject: [PATCH] mtd: ndfc: fix a memory leak in ndfc_remove
Date: Tue, 07 Jun 2011 22:55:21 +0800 [thread overview]
Message-ID: <1307458521.22584.1.camel@phoenix> (raw)
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
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;
}
--
1.7.4.1
next reply other threads:[~2011-06-07 14:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-07 14:55 Axel Lin [this message]
2011-06-07 14:55 ` [PATCH] mtd: ndfc: fix a memory leak in ndfc_remove Axel Lin
2011-06-08 11:08 ` Artem Bityutskiy
2011-06-08 11:08 ` Artem Bityutskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1307458521.22584.1.camel@phoenix \
--to=axel.lin@gmail.com \
--cc=Artem.Bityutskiy@nokia.com \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=smaclennan@pikatech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.