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.stricted.de/?a=commitdiff_plain;h=96166056076af59d40e5b5aec5b09611c74cc911;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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 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; }