From: Markus Elfring Date: Sat, 05 Oct 2019 14:04:03 +0000 Subject: Re: [PATCH v2] mtd: onenand: prevent memory leak in onenand_scan Message-Id: List-Id: References: <20191004171909.6378-1-navid.emamdoost@gmail.com> In-Reply-To: <20191004171909.6378-1-navid.emamdoost@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: Navid Emamdoost , linux-mtd@lists.infradead.org Cc: kernel-janitors@vger.kernel.org, Vignesh Raghavendra , Richard Weinberger , Miquel Raynal , Kangjie Lu , linux-kernel@vger.kernel.org, Marek Vasut , Kyungmin Park , Navid Emamdoost , Stephen McCamant , Brian Norris , David Woodhouse > In onenand_scan if scan_bbt fails the allocated buffers for oob_buf, > verify_buf, and page_buf should be released. Can a wording like the following be nicer for the change description? Release the memory for the buffers “oob_buf”, “verify_buf” and “page_buf” after a call of the function “scan_bbt” failed in the implementation of the function “onenand_scan”. > Fixes: 5988af231978 ("mtd: Flex-OneNAND support") … > --- > Changes in v2: … > for the hint). Did you take another review comment into account for this patch change log? > --- Please replace the delimiter at this place by a blank line in subsequent messages. > drivers/mtd/nand/onenand/onenand_base.c | 8 +++++++- … Regards, Markus