mtd: ndfc: fix a memory leak in ndfc_remove
authorAxel Lin <axel.lin@gmail.com>
Tue, 7 Jun 2011 14:55:21 +0000 (22:55 +0800)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Sun, 11 Sep 2011 12:02:05 +0000 (15:02 +0300)
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
drivers/mtd/nand/ndfc.c

index cb66fd7..70c04ff 100644 (file)
@@ -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;
 }