]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Tue Jul 30 13:23:13 1996 Ulrich Drepper <drepper@cygnus.com>
authorRoland McGrath <roland@gnu.org>
Tue, 30 Jul 1996 19:02:29 +0000 (19:02 +0000)
committerRoland McGrath <roland@gnu.org>
Tue, 30 Jul 1996 19:02:29 +0000 (19:02 +0000)
* locale/setlocale.c (setlocale): Don't try to free C locale
data.
Reported by Matthias Urlichs.

locale/setlocale.c

index 4a9f7854eb52d71463e51c74cc5f90acb0a0d045..2c8ec3d40151d27a8408979aa035f88f2cd5b7bc 100644 (file)
@@ -325,7 +325,8 @@ setlocale (int category, const char *locale)
                save_errno = errno;
 
                while (++category < LC_ALL)
-                 if (_nl_current[category] != NULL)
+                 if (_nl_current[category] != NULL
+                     && newdata[category] != _nl_C[category])
                    _nl_free_locale (newdata[category]);
                  else
                    if (_nl_current[category] == NULL