Re: [PATCH v2] mtd: rawnand: Fix a memory leak bug

From: Miquel Raynal
Date: Mon Aug 26 2019 - 09:00:12 EST

On Mon, 2019-08-19 at 02:46:04 UTC, Wenwen Wang wrote:
> In nand_scan_bbt(), a temporary buffer 'buf' is allocated through
> vmalloc(). However, if check_create() fails, 'buf' is not deallocated,
> leading to a memory leak bug. To fix this issue, free 'buf' before
> returning the error.
> Signed-off-by: Wenwen Wang <wenwen@xxxxxxxxxx>

Applied to nand/next, thanks.