Skip to content

Commit

Permalink
mtd: txx9ndfmc: Use nand_release to free resources
Browse files Browse the repository at this point in the history
This patch fixes memory leak on chip->bbt and chip->buffers.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
atsushi-nemoto authored and David Woodhouse committed Nov 30, 2009
1 parent d6587fe commit 6eb4fef
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/mtd/nand/txx9ndfmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 6eb4fef

Please sign in to comment.