From 71e752b9347ff63360c03ffa14b78beead20a96d Mon Sep 17 00:00:00 2001 From: Zheng Bao Date: Sun, 19 Feb 2023 10:52:43 +0800 Subject: [PATCH] amdfwtool: Remove the useless variable "rom" Now we use ctx.rom. Remove the wrong statement releasing null pointer. Change-Id: I134335ed741dc067e232621106f2057e50ba6a1a Signed-off-by: Zheng Bao Reviewed-on: https://review.coreboot.org/c/coreboot/+/73118 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held Reviewed-by: Fred Reitberger --- util/amdfwtool/amdfwtool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c index ac25bd2087..7e38a6a858 100644 --- a/util/amdfwtool/amdfwtool.c +++ b/util/amdfwtool/amdfwtool.c @@ -2056,7 +2056,6 @@ int main(int argc, char **argv) int c; int retval = 0; char *tmp; - char *rom = NULL; embedded_firmware *amd_romsig; psp_directory_table *pspdir = NULL; psp_directory_table *pspdir2 = NULL; @@ -2641,6 +2640,6 @@ int main(int argc, char **argv) } } - free(rom); + free(ctx.rom); return retval; }