diff options
| author | Andrew Goodbody <[email protected]> | 2025-08-08 11:29:33 +0100 |
|---|---|---|
| committer | Peng Fan <[email protected]> | 2025-08-27 15:49:59 +0800 |
| commit | dc37adfc040877db359abdc7eab19adffb8fc722 (patch) | |
| tree | 885c6c8ef7a1806f09e71578a8d27e87fa125a9c /drivers | |
| parent | 05b11146363039a00bff09c77be077ebdaf1f5d0 (diff) | |
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 <[email protected]>
Signed-off-by: Peng Fan <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/qe/qe.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/qe/qe.c b/drivers/qe/qe.c index 69b7de084e5..25880db37cf 100644 --- a/drivers/qe/qe.c +++ b/drivers/qe/qe.c @@ -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", |
