From a9f09d131da95c88a807f5ee92b4e75ff28d59a3 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Fri, 20 Jan 2023 16:44:31 +0100 Subject: [PATCH] [intl] LANGUAGE was allocated by malloc, so it must be released by free --- src/intl/gettext/libintl.c | 5 ++++- src/intl/libintl.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/intl/gettext/libintl.c b/src/intl/gettext/libintl.c index 9aa373b4..a4c7f39c 100644 --- a/src/intl/gettext/libintl.c +++ b/src/intl/gettext/libintl.c @@ -231,7 +231,10 @@ init_gettext(struct module *module) static void done_gettext(struct module *module) { - mem_free_set(&LANGUAGE, NULL); + if (LANGUAGE) { + free(LANGUAGE); + LANGUAGE = NULL; + } } struct module gettext_module = struct_module( diff --git a/src/intl/libintl.c b/src/intl/libintl.c index 777e0814..f07c538d 100644 --- a/src/intl/libintl.c +++ b/src/intl/libintl.c @@ -229,7 +229,10 @@ init_gettext(struct module *module) static void done_gettext(struct module *module) { - mem_free_set(&LANGUAGE, NULL); + if (LANGUAGE) { + free(LANGUAGE); + LANGUAGE = NULL; + } } struct module gettext_module = struct_module(