summaryrefslogtreecommitdiffstats
path: root/flashrom.c
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2012-12-26 07:55:00 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2012-12-26 07:55:00 +0000
commitbbca9e5163729ecc78d029687257ab7988daa063 (patch)
tree0fd10acc1591068806f8118e76f8c4c120783afd /flashrom.c
parent7876f8474e71578341ef077dbb2c188e9ddcb303 (diff)
downloadflashrom-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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/flashrom.c b/flashrom.c
index e2ad170..dae54f0 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -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;
}
OpenPOWER on IntegriCloud