[PATCH] acpi: syntaxcheck: free lists on error exit return

Colin King colin.king at canonical.com
Tue Jul 15 12:54:40 UTC 2014


From: Colin Ian King <colin.king at canonical.com>

Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
 src/acpi/syntaxcheck/syntaxcheck.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/acpi/syntaxcheck/syntaxcheck.c b/src/acpi/syntaxcheck/syntaxcheck.c
index f8daafc..e73d519 100644
--- a/src/acpi/syntaxcheck/syntaxcheck.c
+++ b/src/acpi/syntaxcheck/syntaxcheck.c
@@ -476,6 +476,9 @@ static int syntaxcheck_table(fwts_framework *fw, char *tablename, int which)
 
 	if (fwts_iasl_reassemble(fw, table->data, table->length,
 				&iasl_disassembly, &iasl_stdout, &iasl_stderr) != FWTS_OK) {
+		fwts_text_list_free(iasl_disassembly);
+		fwts_text_list_free(iasl_stderr);
+		fwts_text_list_free(iasl_stdout);
 		fwts_aborted(fw, "Cannot re-assasemble with iasl.");
 		return FWTS_ERROR;
 	}
-- 
2.0.1




More information about the fwts-devel mailing list