diff options
author | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2011-06-26 20:45:35 +0000 |
---|---|---|
committer | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2011-06-26 20:45:35 +0000 |
commit | 00155498a86e2c77ee6c08d274fa7954f38a56f6 (patch) | |
tree | 25c2fba44df4a8c7e9ec5289036a611760f84b9b /chipset_enable.c | |
parent | b23df71149f39c45952778c5fe11ef76094d8719 (diff) | |
download | ast2050-flashrom-00155498a86e2c77ee6c08d274fa7954f38a56f6.zip ast2050-flashrom-00155498a86e2c77ee6c08d274fa7954f38a56f6.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 'chipset_enable.c')
-rw-r--r-- | chipset_enable.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chipset_enable.c b/chipset_enable.c index 0c77f07..4f409cd 100644 --- a/chipset_enable.c +++ b/chipset_enable.c @@ -1206,6 +1206,7 @@ int chipset_flash_enable(void) struct pci_dev *dev = NULL; int ret = -2; /* Nothing! */ int i; + char *s; /* Now let's try to find the chipset we have... */ for (i = 0; chipset_enables[i].vendor_name != NULL; i++) { @@ -1244,8 +1245,9 @@ int chipset_flash_enable(void) msg_pinfo("PROBLEMS, continuing anyway\n"); } - msg_pinfo("This chipset supports the following protocols: %s.\n", - flashbuses_to_text(buses_supported)); + s = flashbuses_to_text(buses_supported); + msg_pinfo("This chipset supports the following protocols: %s.\n", s); + free(s); return ret; } |