From ceb0943a821f15d0f19ad2a0ed627d184695073f Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Fri, 25 Nov 2022 22:31:05 +0100 Subject: [PATCH] Fix two memory leaks on CALLOC/FREE of ec_globals_alloc function, detected by CFLAGS="-g -fsanitize=address" Fixes: #1201 --- src/ec_globals.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ec_globals.c b/src/ec_globals.c index 373661c47..4e039851c 100644 --- a/src/ec_globals.c +++ b/src/ec_globals.c @@ -84,6 +84,7 @@ void ec_globals_free(void) free_ip_list(ec_gbls->t2); EC_GBL_FREE(ec_gbls->t2); + EC_GBL_FREE(ec_gbls->wifi); EC_GBL_FREE(ec_gbls->env->name); EC_GBL_FREE(ec_gbls->env->version); EC_GBL_FREE(ec_gbls->env->debug_file); @@ -102,6 +103,7 @@ void ec_globals_free(void) EC_GBL_FREE(ec_gbls->conf); /* destroy the list structure */ filter_clear(); + EC_GBL_FREE(ec_gbls->ui); EC_GBL_FREE(ec_gbls);