Messages in this thread | | | From | Miquel Raynal <> | Subject | Re: [PATCH] mtd: onenand_base: Fix a memory leak bug | Date | Mon, 26 Aug 2019 15:00:11 +0200 |
| |
On Sun, 2019-08-18 at 15:52:49 UTC, Wenwen Wang wrote: > In onenand_scan(), if CONFIG_MTD_ONENAND_VERIFY_WRITE is defined, > 'this->verify_buf' is allocated through kzalloc(). However, it is not > deallocated in the following execution, if the allocation for > 'this->oob_buf' fails, leading to a memory leak bug. To fix this issue, > free 'this->verify_buf' before returning the error. > > Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
| |