[PATCH] lib: fwts_framework: fix memory leak on fw->fdt
Colin King
colin.king at canonical.com
Thu Jul 4 16:00:57 UTC 2019
From: Colin Ian King <colin.king at canonical.com>
Any data allocated for fw->fdt is not being free'd at the end of the
framework, leading to a memory leak. Free it.
Addresses-Coverity: ("Resource leak")
Fixes: 3b364fca9699 ("devicetree: add infrastructure for device-tree tests")
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
src/lib/src/fwts_framework.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
index a84dc295..698fa49a 100644
--- a/src/lib/src/fwts_framework.c
+++ b/src/lib/src/fwts_framework.c
@@ -1633,6 +1633,7 @@ tidy_close:
free(fw->olog);
free(fw->json_data_path);
free(fw->json_data_file);
+ free(fw->fdt);
fwts_list_free_items(&fw->errors_filter_discard, NULL);
fwts_list_free_items(&fw->errors_filter_keep, NULL);
--
2.20.1
More information about the fwts-devel
mailing list