]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(_nl_find_locale): Free normalized_codeset; this fixes a memory leak.
authorUlrich Drepper <drepper@redhat.com>
Mon, 8 Nov 1999 23:45:13 +0000 (23:45 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 8 Nov 1999 23:45:13 +0000 (23:45 +0000)
locale/findlocale.c

index 94f01b413248c3bfd1b6cba5927523a008854b34..1eac186f162544249dfb6d2dea8cf2948d6a0446 100644 (file)
@@ -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);