[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190826130011.15239-1-miquel.raynal@bootlin.com>
Date: Mon, 26 Aug 2019 15:00:11 +0200
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Wenwen Wang <wenwen@...uga.edu>
Cc: Miquel Raynal <miquel.raynal@...tlin.com>,
Vignesh Raghavendra <vigneshr@...com>,
Richard Weinberger <richard@....at>,
open list <linux-kernel@...r.kernel.org>,
Marek Vasut <marek.vasut@...il.com>,
Kyungmin Park <kyungmin.park@...sung.com>,
"open list:ONENAND FLASH DRIVER" <linux-mtd@...ts.infradead.org>,
Brian Norris <computersforpeace@...il.com>,
David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCH] mtd: onenand_base: Fix a memory leak bug
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@...uga.edu>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
Powered by blists - more mailing lists