aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-07-30 19:02:29 +0000
committerRoland McGrath <roland@gnu.org>1996-07-30 19:02:29 +0000
commitd69b7ce7eeaea3e383d400237b3b00c83b8130fc (patch)
tree0bc80629368aab055c0844b56755400f0734bc86
parentb98f370ce8804e74dae6114fab955cfc0bf93748 (diff)
downloadglibc-d69b7ce7eeaea3e383d400237b3b00c83b8130fc.zip
glibc-d69b7ce7eeaea3e383d400237b3b00c83b8130fc.tar.gz
glibc-d69b7ce7eeaea3e383d400237b3b00c83b8130fc.tar.bz2
Tue Jul 30 13:23:13 1996 Ulrich Drepper <drepper@cygnus.com>
* locale/setlocale.c (setlocale): Don't try to free C locale data. Reported by Matthias Urlichs.
-rw-r--r--locale/setlocale.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/locale/setlocale.c b/locale/setlocale.c
index 4a9f785..2c8ec3d 100644
--- a/locale/setlocale.c
+++ b/locale/setlocale.c
@@ -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