[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1257172848-6282-1-git-send-email-anemo@mba.ocn.ne.jp>
Date: Mon, 2 Nov 2009 23:40:48 +0900
From: Atsushi Nemoto <anemo@....ocn.ne.jp>
To: linux-mtd@...ts.infradead.org
Cc: dwmw2@...radead.org, linux-kernel@...r.kernel.org
Subject: [PATCH] txx9ndfmc: Use nand_release() to free resources
This patch fixes memory leak on chip->bbt and chip->buffers.
Signed-off-by: Atsushi Nemoto <anemo@....ocn.ne.jp>
---
drivers/mtd/nand/txx9ndfmc.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/txx9ndfmc.c b/drivers/mtd/nand/txx9ndfmc.c
index 73af832..863513c 100644
--- a/drivers/mtd/nand/txx9ndfmc.c
+++ b/drivers/mtd/nand/txx9ndfmc.c
@@ -429,11 +429,10 @@ static int __exit txx9ndfmc_remove(struct platform_device *dev)
chip = mtd->priv;
txx9_priv = chip->priv;
+ nand_release(mtd);
#ifdef CONFIG_MTD_PARTITIONS
- del_mtd_partitions(mtd);
kfree(drvdata->parts[i]);
#endif
- del_mtd_device(mtd);
kfree(txx9_priv->mtdname);
kfree(txx9_priv);
}
--
1.5.6.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists