Fix incorrect structure freeing in omap_nand_remove()
Subsystems (2)
PATCH 1/1 Fix incorrect structure freeing in omap_nand_remove()
From: Oleg Drokin <[email protected]>
Attempt to kfree(&info->mtd) is a bad idea since it's a different substructure in the middle of a properly allocated struct omap_nand_info.
I guess nobody tripped it before since nobody really removes NAND flash and nobody unloads the module either.
Signed-off-by Oleg Drokin <[email protected]>
--- drivers/mtd/nand/omap2.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/nand/omap2.c +1 -1
@@ -1139,7 +1139,7 @@ static int omap_nand_remove(struct platform_device *pdev)/* Release NAND device, its internal structures and partitions */ nand_release (&info->mtd);iounmap (info->nand.IO_ADDR_R); -kfree (&info->mtd); +kfree (info);return 0 ; }
Signature · 1 line
1.7.4.4