From: Ulrich Drepper Date: Mon, 8 Nov 1999 23:45:13 +0000 (+0000) Subject: (_nl_find_locale): Free normalized_codeset; this fixes a memory leak. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a132adc9bb03600660c18802cdc1323143bda597;p=thirdparty%2Fglibc.git (_nl_find_locale): Free normalized_codeset; this fixes a memory leak. --- 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);