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

ivanhu ivan.hu at canonical.com
Wed Jul 24 06:26:29 UTC 2019



On 7/5/19 12:00 AM, 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: Ivan Hu <ivan.hu at canonical.com>



More information about the fwts-devel mailing list