ACK: [PATCH] lib: fwts_framework: fix memory leak on fw->fdt

Alex Hung alex.hung at canonical.com
Thu Jul 4 17:41:10 UTC 2019


On 2019-07-04 10:00 a.m., Colin King wrote:
> 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);
> 

Acked-by: Alex Hung <alex.hung at canonical.com>



More information about the fwts-devel mailing list