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
commitb8911d6cecf5044f3e9c444e3086dd269a0279b1 (patch)
tree0fd10acc1591068806f8118e76f8c4c120783afd /flashrom.c
parent21541a6b22c0ccbfa6b65a6c1d4a76cfd0360ca2 (diff)
downloadast2050-flashrom-b8911d6cecf5044f3e9c444e3086dd269a0279b1.zip
ast2050-flashrom-b8911d6cecf5044f3e9c444e3086dd269a0279b1.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