]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: nand: fix memory leak in ONFI extended parameter page
authorBrian Norris <computersforpeace@gmail.com>
Tue, 17 Sep 2013 00:59:20 +0000 (17:59 -0700)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 27 Sep 2013 10:48:02 +0000 (05:48 -0500)
commit45a4814c6b54a3f3342c8ccf7a15635577520d16
tree917490c0d13717b7fa37e9791ab3ed39165d1521
parent67548d8fcee6ee970fb7cf39da7d4b56690ea9ee
mtd: nand: fix memory leak in ONFI extended parameter page

This fixes a memory leak in the ONFI support code for detecting the
required ECC levels from this commit:

  commit f60863500cd57e3da61e0dfb2c84526caf7d6b0f
  Author: Huang Shijie <b32955@freescale.com>
  Date:   Wed May 22 10:28:27 2013 +0800

      mtd: get the ECC info from the Extended Parameter Page

In the success case, we never freed the 'ep' buffer.

Also, this fixes an oversight in the same commit where we (harmlessly)
freed the NULL pointer.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/nand_base.c