mtd: ndfc: fix a memory leak in ndfc_remove

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Nov 7 11:59:12 EST 2011


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=96166056076af59d40e5b5aec5b09611c74cc911
Commit:     96166056076af59d40e5b5aec5b09611c74cc911
Parent:     ad274cecdbce18d13075bde3aabe5882802056de
Author:     Axel Lin <axel.lin at gmail.com>
AuthorDate: Tue Jun 7 22:55:21 2011 +0800
Committer:  Artem Bityutskiy <artem.bityutskiy at intel.com>
CommitDate: Sun Sep 11 15:02:05 2011 +0300

    mtd: ndfc: fix a memory leak in ndfc_remove
    
    Signed-off-by: Axel Lin <axel.lin at gmail.com>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
---
 drivers/mtd/nand/ndfc.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c
index cb66fd7..70c04ff 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;
 }



More information about the linux-mtd-cvs mailing list