From c9b4363f313eee3200ed0b583182582e9a692985 Mon Sep 17 00:00:00 2001 From: Taras Drozdovskyi Date: Mon, 19 Feb 2024 06:55:59 +0200 Subject: [PATCH] fix: Fixed double free operation in fwinfogen.c Signed-off-by: Taras Drozdovskyi --- tools/fwinfogen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/fwinfogen.c b/tools/fwinfogen.c index 5596031b..7422420d 100644 --- a/tools/fwinfogen.c +++ b/tools/fwinfogen.c @@ -493,7 +493,8 @@ int main(int argc, char** argv) #endif ret = 0; exit: - free(buf); + if (buf != NULL) + free(buf); fclose(fd); #ifdef CONFIG_BOOTLOADER2