Skip to content
Commit 6d50e9b6 authored by Martin Blumenstingl's avatar Martin Blumenstingl Committed by Miquel Raynal
Browse files

mtd: rawnand: meson: fix a potential memory leak in meson_nfc_read_buf



meson_nfc_dma_buffer_setup() is called with the "info" buffer which is
allocated a few lines before using kzalloc(). If
meson_nfc_dma_buffer_setup() fails we need to free the allocated "info"
buffer instead of only freeing it upon success.

Fixes: 8fae856c ("mtd: rawnand: meson: add support for Amlogic NAND flash controller")
Signed-off-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: default avatarLiang Yang <liang.yang@amlogic.com>
Reviewed-by: default avatarKevin Hilman <khilman@baylibre.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
parent 91e9dd77
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment