[PATCH V2] mtd: gpmi: fix the NULL pointer

Huang Shijie b32955 at freescale.com
Mon Nov 11 22:20:21 EST 2013


于 2013年11月11日 18:40, Huang Shijie 写道:
> +	chip->buffers = kzalloc(sizeof(*chip->buffers), GFP_KERNEL);
> +	if (!chip->buffers)
> +		return -ENOMEM;
> +	chip->options |= NAND_OWN_BUFFERS;
It has a memory leak for the NAND_OWN_BUFFERS. i should free this buffer
myself too.

thanks
Huang Shijie




More information about the linux-mtd mailing list