Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/34405 )
Change subject: cli_classic: Fix Memory leak ......................................................................
Patch Set 1:
(2 comments)
Looks good, but the output should be more user friendly.
https://review.coreboot.org/c/flashrom/+/34405/1/cli_classic.c File cli_classic.c:
https://review.coreboot.org/c/flashrom/+/34405/1/cli_classic.c@386 PS1, Line 386: logfile[0] != '\0' nit, just `if (logfile)` would be enough. It was initialized to `NULL` above, `if (logfile)` would tell us if that changed already.
https://review.coreboot.org/c/flashrom/+/34405/1/cli_classic.c@387 PS1, Line 387: Warning: log file not free of older string. Running free() rightnow.\n Well, if we follow the code flow, it's clear that this happens (only) when there were multiple `-o <logfile>` on the command line (you can try btw.). So we should state that here (a user wouldn't understand what free() means). e.g.
"Warning: -o/--output specified multiple times.\n"