提交 6eb4feff 编写于 作者: A Atsushi Nemoto 提交者: David Woodhouse

mtd: txx9ndfmc: Use nand_release to free resources

This patch fixes memory leak on chip->bbt and chip->buffers.
Signed-off-by: NAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
上级 d6587fea
...@@ -429,11 +429,10 @@ static int __exit txx9ndfmc_remove(struct platform_device *dev) ...@@ -429,11 +429,10 @@ static int __exit txx9ndfmc_remove(struct platform_device *dev)
chip = mtd->priv; chip = mtd->priv;
txx9_priv = chip->priv; txx9_priv = chip->priv;
nand_release(mtd);
#ifdef CONFIG_MTD_PARTITIONS #ifdef CONFIG_MTD_PARTITIONS
del_mtd_partitions(mtd);
kfree(drvdata->parts[i]); kfree(drvdata->parts[i]);
#endif #endif
del_mtd_device(mtd);
kfree(txx9_priv->mtdname); kfree(txx9_priv->mtdname);
kfree(txx9_priv); kfree(txx9_priv);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册