1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-06-30 21:52:36 +02:00

Fix memleaks in cli_classic.c

Frees the memory allocated for the following strings
- log file name
- layout file name
- image file name
- programmer parameter (and reset the associated global variable in flashrom.c)

Also, free the flashchip structs allocated by probe_flash.

The layout image names were not fixed due to the pending layout patches.

These bugs were found thanks to valgrind.

Corresponding to flashrom svn r1629.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
This commit is contained in:
Stefan Tauner
2012-12-26 07:55:00 +00:00
parent 21541a6b22
commit b8911d6cec
2 changed files with 19 additions and 1 deletions

View File

@ -351,6 +351,7 @@ int programmer_shutdown(void)
int i = --shutdown_fn_count;
ret |= shutdown_fn[i].func(shutdown_fn[i].data);
}
programmer_param = NULL;
return ret;
}