aboutsummaryrefslogtreecommitdiff
path: root/locale/duplocale.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-08-31 18:29:52 +0000
committerRoland McGrath <roland@gnu.org>2002-08-31 18:29:52 +0000
commit426bf3a396d0f7743decebe861b503398400233e (patch)
tree93c1780d1e425359f407efd06db85826f5314799 /locale/duplocale.c
parent26e401242cf6af557eba9641953920f2908ea47e (diff)
downloadglibc-426bf3a396d0f7743decebe861b503398400233e.zip
glibc-426bf3a396d0f7743decebe861b503398400233e.tar.gz
glibc-426bf3a396d0f7743decebe861b503398400233e.tar.bz2
* locale/duplocale.c (__duplocale): Free names from the right array.
* locale/uselocale.c (__uselocale): Return previous locale when setting a new one. * locale/newlocale.c: Commit changes from 2002-08-30 batch where I failed to commit this file: (__newlocale): Fill in __names array.
Diffstat (limited to 'locale/duplocale.c')
-rw-r--r--locale/duplocale.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/locale/duplocale.c b/locale/duplocale.c
index 0e1e673..867232e 100644
--- a/locale/duplocale.c
+++ b/locale/duplocale.c
@@ -56,8 +56,8 @@ __duplocale (__locale_t dataset)
if (result->__names[cnt] == NULL)
{
while (cnt-- > 0)
- if (dataset->__names[cnt] != _nl_C_name)
- free ((char *) dataset->__names[cnt]);
+ if (result->__names[cnt] != _nl_C_name)
+ free ((char *) result->__names[cnt]);
free (result);
result = NULL;
break;