mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-26 22:52:34 +02:00
cli_classic: Fix Memory leak
Found-by: scan-build 7.0.1-8 Change-Id: I84e642b57b95953f376569e443ef8d8eda7bf98f Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/flashrom/+/34405 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
parent
5800f5841d
commit
ef78de4a21
@ -383,6 +383,11 @@ int main(int argc, char *argv[])
|
||||
fprintf(stderr, "Log file not supported in standalone mode. Aborting.\n");
|
||||
cli_classic_abort_usage();
|
||||
#else /* STANDALONE */
|
||||
if (logfile) {
|
||||
fprintf(stderr, "Warning: -o/--output specified multiple times.\n");
|
||||
free(logfile);
|
||||
}
|
||||
|
||||
logfile = strdup(optarg);
|
||||
if (logfile[0] == '\0') {
|
||||
fprintf(stderr, "No log filename specified.\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user