[patch for 2.6.29? 4/4] mtd/maps: blackfin async flash maps: fix up memory leak

Atsushi Nemoto anemo at mba.ocn.ne.jp
Wed Feb 11 19:35:31 EST 2009


On Wed, 11 Feb 2009 13:12:19 -0800, akpm at linux-foundation.org wrote:
> @@ -170,6 +170,7 @@ static int __devinit bfin_flash_probe(st
>  	if (ret > 0) {
>  		pr_devinit(KERN_NOTICE DRIVER_NAME ": Using commandline partition definition\n");
>  		add_mtd_partitions(state->mtd, pdata->parts, ret);
> +		kfree(pdata->parts);
>  
>  	} else if (pdata->nr_parts) {
>  		pr_devinit(KERN_NOTICE DRIVER_NAME ": Using board partition definition\n");

As Matthias Kaehlcke pointed out in mail titled "[BUG]
physmap_flash_probe() frees memory still in use", this fix introduce
another bug.

Revised patch for physmap driver is:
http://lists.infradead.org/pipermail/linux-mtd/2009-February/024590.html

Mike, please update this blackfin patch too.

---
Atsushi Nemoto



More information about the linux-mtd mailing list