From 00155498a86e2c77ee6c08d274fa7954f38a56f6 Mon Sep 17 00:00:00 2001 From: Stefan Tauner Date: Sun, 26 Jun 2011 20:45:35 +0000 Subject: Fix memleaks due to incorrect usage of flashbuses_to_text Corresponding to flashrom svn r1357. Signed-off-by: Stefan Tauner Acked-by: Carl-Daniel Hailfinger --- flashrom.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'flashrom.c') 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. -- cgit v1.1