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