diff options
author | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2012-12-26 07:55:00 +0000 |
---|---|---|
committer | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2012-12-26 07:55:00 +0000 |
commit | bbca9e5163729ecc78d029687257ab7988daa063 (patch) | |
tree | 0fd10acc1591068806f8118e76f8c4c120783afd /flashrom.c | |
parent | 7876f8474e71578341ef077dbb2c188e9ddcb303 (diff) | |
download | flashrom-bbca9e5163729ecc78d029687257ab7988daa063.zip flashrom-bbca9e5163729ecc78d029687257ab7988daa063.tar.gz |
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>
Diffstat (limited to 'flashrom.c')
-rw-r--r-- | flashrom.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; } |