mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-05-05 04:36:13 +02:00
drivers: qe: avoid double free()
Avoid calling free(addr) twice if the device for ucode is not found. This patch repeats a similar fix but that only applied to code without CONFIG_TFABOOT enabled. This patch applies to the code with CONFIG_TFABOOT enabled. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org> Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
parent
05b1114636
commit
dc37adfc04
@ -255,7 +255,6 @@ void u_qe_init(void)
|
||||
struct mmc *mmc = find_mmc_device(CONFIG_ENV_MMC_DEVICE_INDEX);
|
||||
|
||||
if (!mmc) {
|
||||
free(addr);
|
||||
printf("\nMMC cannot find device for ucode\n");
|
||||
} else {
|
||||
printf("\nMMC read: dev # %u, block # %u, count %u ...\n",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user