[PATCH] mtd: ndfc: fix a memory leak in ndfc_remove
Axel Lin
axel.lin at gmail.com
Tue Jun 7 10:55:21 EDT 2011
Signed-off-by: Axel Lin <axel.lin at 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
More information about the linux-mtd
mailing list