From 96166056076af59d40e5b5aec5b09611c74cc911 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Tue, 7 Jun 2011 22:55:21 +0800 Subject: [PATCH] mtd: ndfc: fix a memory leak in ndfc_remove Signed-off-by: Axel Lin Signed-off-by: Artem Bityutskiy --- drivers/mtd/nand/ndfc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c index cb66fd79f1fa..70c04ffa573c 100644 --- a/drivers/mtd/nand/ndfc.c +++ b/drivers/mtd/nand/ndfc.c @@ -283,6 +283,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; } -- 2.39.5