summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2020-08-02 21:11:06 -0700
committerStefano Babic <sbabic@denx.de>2021-01-23 11:30:31 +0100
commitfc11dc112d1defef0091a3ba2b5785b00e502929 (patch)
tree9b4dae96eb26710937d1b8bc79b93ff5689258d6 /arch
parent9dd599a7a49f5730e2056f71fddff9fcf597488f (diff)
downloadu-boot-fc11dc112d1defef0091a3ba2b5785b00e502929.tar.gz
u-boot-fc11dc112d1defef0091a3ba2b5785b00e502929.tar.xz
u-boot-fc11dc112d1defef0091a3ba2b5785b00e502929.zip
imx: nandbcb: Fix resource leak
Fix Coverity Issue 9006655. In write_fcb, leak of memory to resource "fcb_raw_page". Since we have initialized the "ret" to 0, should return the value of ret. 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>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/cmd_nandbcb.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/cmd_nandbcb.c b/arch/arm/mach-imx/cmd_nandbcb.c
index c01f6aea73..6e50471164 100644
--- a/arch/arm/mach-imx/cmd_nandbcb.c
+++ b/arch/arm/mach-imx/cmd_nandbcb.c
@@ -653,8 +653,6 @@ static int write_fcb(struct boot_config *boot_cfg, struct fcb_block *fcb)
off += g_boot_search_stride;
}
- return 0;
-
fcb_raw_page_err:
kfree(fcb_raw_page);