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 --- chipset_enable.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'chipset_enable.c') 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; } -- cgit v1.1