lkml.org 
[lkml]   [2019]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] mtd: spi-nor: fix a memory leak bug
Date


On 08/19/2019 08:16 PM, Wenwen Wang wrote:
> External E-Mail
>
>
> In spi_nor_parse_4bait(), 'dwords' is allocated through kmalloc(). However,
> it is not deallocated in the following execution if spi_nor_read_sfdp()
> fails, leading to a memory leak. To fix this issue, free 'dwords' before
> returning the error.
>
> Fixes: 816873eaeec6 ("mtd: spi-nor: parse SFDP 4-byte Address Instruction
> Table")
>

^ Miquel, maybe you can drop this new line when applying.

> Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>

This is a good candidate for mtd/fixes, so:

Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
\
 
 \ /
  Last update: 2019-08-20 16:54    [W:0.046 / U:1.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site