lkml.org 
[lkml]   [2019]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH] mtd: onenand_base: Fix a memory leak bug
    Date
    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

    \
     
     \ /
      Last update: 2019-08-26 15:00    [W:2.777 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site