mtd: gpmi: fix raw_buffer pointer double free issue
authorHan Xu <han.xu@nxp.com>
Mon, 4 Apr 2016 20:41:29 +0000 (15:41 -0500)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 19 Apr 2016 20:04:52 +0000 (22:04 +0200)
commit2cd395d13a104cd96ddae5c5612871dc18553cca
tree05227121a6e9d98b7ea9a320ada0761c03fb4ffb
parent269ecf03a5b32b0d1de1f60a4b86b75c0521053f
mtd: gpmi: fix raw_buffer pointer double free issue

fix the raw_buffer pointer double free issue found by coverify.

CID 18344 (#2 of 2): Double free (USE_AFTER_FREE)
3. double_free: Calling gpmi_alloc_dma_buffer frees pointer
this->raw_buffer which has already been freed

Signed-off-by: Han Xu <han.xu@nxp.com>
Reviewed-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/gpmi-nand/gpmi-nand.c