From a132adc9bb03600660c18802cdc1323143bda597 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 8 Nov 1999 23:45:13 +0000 Subject: [PATCH] (_nl_find_locale): Free normalized_codeset; this fixes a memory leak. --- locale/findlocale.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/locale/findlocale.c b/locale/findlocale.c index 94f01b41324..1eac186f162 100644 --- a/locale/findlocale.c +++ b/locale/findlocale.c @@ -138,6 +138,10 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len, return NULL; } + /* The space for normalized_codeset is dynamically allocated. Free it. */ + if (mask & XPG_NORM_CODESET) + free ((void *) normalized_codeset); + if (locale_file->decided == 0) _nl_load_locale (locale_file, category); -- 2.47.2