summaryrefslogtreecommitdiffstats
path: root/flashrom.c
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2011-06-26 20:45:35 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2011-06-26 20:45:35 +0000
commit34912416db4eb3066d6a3c09606d865747b185b4 (patch)
tree25c2fba44df4a8c7e9ec5289036a611760f84b9b /flashrom.c
parentcf39cdefa4d8f9b633c7594d6b80053afe4d82f8 (diff)
downloadflashrom-34912416db4eb3066d6a3c09606d865747b185b4.zip
flashrom-34912416db4eb3066d6a3c09606d865747b185b4.tar.gz
Fix memleaks due to incorrect usage of flashbuses_to_text
Corresponding to flashrom svn r1357. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'flashrom.c')
-rw-r--r--flashrom.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/flashrom.c b/flashrom.c
index 13d398e..5bf9645 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -1186,10 +1186,11 @@ notfound:
#endif
snprintf(location, sizeof(location), "on %s", programmer_table[programmer].name);
+ tmp = flashbuses_to_text(flash->bustype);
msg_cinfo("%s chip \"%s %s\" (%d kB, %s) %s.\n",
- force ? "Assuming" : "Found",
- fill_flash->vendor, fill_flash->name, fill_flash->total_size,
- flashbuses_to_text(fill_flash->bustype), location);
+ force ? "Assuming" : "Found", fill_flash->vendor,
+ fill_flash->name, fill_flash->total_size, tmp, location);
+ free(tmp);
/* Flash registers will not be mapped if the chip was forced. Lock info
* may be stored in registers, so avoid lock info printing.
OpenPOWER on IntegriCloud