diff options
author | stefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2011-06-26 20:45:35 +0000 |
---|---|---|
committer | stefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2011-06-26 20:45:35 +0000 |
commit | bd5bdf8bdef7466543b1831fbff549f2fd11af2d (patch) | |
tree | 25c2fba44df4a8c7e9ec5289036a611760f84b9b /print_wiki.c | |
parent | b093c24cad42abda02a94035810491475a73319a (diff) | |
download | flashrom-bd5bdf8bdef7466543b1831fbff549f2fd11af2d.tar.gz |
fix memleaks due to incorrect usage of flashbuses_to_text
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1357 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'print_wiki.c')
-rw-r--r-- | print_wiki.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/print_wiki.c b/print_wiki.c index e9ccc8b..6280aff 100644 --- a/print_wiki.c +++ b/print_wiki.c @@ -203,6 +203,7 @@ static void print_supported_chips_wiki(int cols) int i = 0, c = 1, chipcount = 0; const struct flashchip *f, *old = NULL; uint32_t t; + char *s; for (f = flashchips; f->name != NULL; f++) chipcount++; @@ -221,10 +222,11 @@ static void print_supported_chips_wiki(int cols) c = !c; t = f->tested; + s = flashbuses_to_text(f->bustype); printf("|- bgcolor=\"#%s\"\n| %s || %s || %d " "|| %s || {{%s}} || {{%s}} || {{%s}} || {{%s}}\n", (c == 1) ? "eeeeee" : "dddddd", f->vendor, f->name, - f->total_size, flashbuses_to_text(f->bustype), + f->total_size, s, (t & TEST_OK_PROBE) ? "OK" : (t & TEST_BAD_PROBE) ? "No" : "?3", (t & TEST_OK_READ) ? "OK" : @@ -233,6 +235,7 @@ static void print_supported_chips_wiki(int cols) (t & TEST_BAD_ERASE) ? "No" : "?3", (t & TEST_OK_WRITE) ? "OK" : (t & TEST_BAD_WRITE) ? "No" : "?3"); + free(s); /* Split table into 'cols' columns. */ if (i >= (chipcount / cols + 1)) { |