]> git.baikalelectronics.ru Git - uboot.git/commit
imx: nandbcb: Fix resource leak in read_fcb
authorYe Li <ye.li@nxp.com>
Mon, 3 Aug 2020 05:43:45 +0000 (22:43 -0700)
committerStefano Babic <sbabic@denx.de>
Sat, 23 Jan 2021 10:30:31 +0000 (11:30 +0100)
commit7c7b94d5268021cdc5e6149c8946d237c6a32e73
tree11795f12a25e1a37d3e1d0f0d3a35d520baebb02
parent82e54acbdd72662d90b44ea4d4afc54e4280849c
imx: nandbcb: Fix resource leak in read_fcb

Fix Coverity Issue 9006657. In read_fcb, leak of memory to system
resource "fcb_raw_page". Adjust the sequence to check the mtd bad
block prior than allocation of "fcb_raw_page", also check the NULL
return of allocation.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
arch/arm/mach-imx/cmd_nandbcb.c