From: Axel Lin Date: Tue, 7 Jun 2011 14:55:21 +0000 (+0800) Subject: mtd: ndfc: fix a memory leak in ndfc_remove X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=96166056076af59d40e5b5aec5b09611c74cc911;p=mv-sheeva.git mtd: ndfc: fix a memory leak in ndfc_remove Signed-off-by: Axel Lin Signed-off-by: Artem Bityutskiy --- diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c index cb66fd79f1f..70c04ffa573 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; }