commit 623adb4529b52adf51baefd8377e70f307dcbdd9
parent 47f6956b28dda14d8e2e660f37576ce5e565359e
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Mon, 26 Feb 2024 10:48:25 +0100
Fix a memleak.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cg_main.c b/src/cg_main.c
@@ -188,11 +188,11 @@ exit:
time_sub(&dt, time_current(&dt), &t0);
time_dump(&dt, TIME_MIN | TIME_SEC, NULL, buf, sizeof(buf));
logger_print(&logger, LOG_OUTPUT, "Total run time: %s.\n", buf);
- logger_release(&logger);
}
release_city(city);
release_catalog(catalog);
if(args) release_args(args);
+ if(logger_initialized) logger_release(&logger);
if(allocator_initialized) {
if(check_memory_allocator(&allocator)) err = EXIT_FAILURE;
mem_shutdown_proxy_allocator(&allocator);