Browse Source

mtd: ndfc: fix a memory leak in ndfc_remove

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Axel Lin 14 years ago
parent
commit
9616605607
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/mtd/nand/ndfc.c

+ 1 - 0
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;
 }