about summary refs log tree commit diff
path: root/locale/duplocale.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-05-04 17:12:37 +0000
committerUlrich Drepper <drepper@redhat.com>2002-05-04 17:12:37 +0000
commitbf418dda292a296312061f91911c51c5ae713329 (patch)
treedaf2e2b211f630b8d3750cc6c990897ee6f6d161 /locale/duplocale.c
parent74ba5a3387e074723bfd2aab5cd2f46883bf63ea (diff)
downloadglibc-bf418dda292a296312061f91911c51c5ae713329.tar.gz
glibc-bf418dda292a296312061f91911c51c5ae713329.tar.xz
glibc-bf418dda292a296312061f91911c51c5ae713329.zip
(__duplocale): Update special members only when allocation succeeded.
Diffstat (limited to 'locale/duplocale.c')
-rw-r--r--locale/duplocale.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/locale/duplocale.c b/locale/duplocale.c
index 3fc46ba738..efbacbb724 100644
--- a/locale/duplocale.c
+++ b/locale/duplocale.c
@@ -49,12 +49,12 @@ __duplocale (__locale_t dataset)
 	    if (result->__locales[cnt]->usage_count < MAX_USAGE_COUNT)
 	      ++result->__locales[cnt]->usage_count;
 	  }
-    }
 
-  /* Update the special members.  */
-  result->__ctype_b = dataset->__ctype_b;
-  result->__ctype_tolower = dataset->__ctype_tolower;
-  result->__ctype_toupper = dataset->__ctype_toupper;
+      /* Update the special members.  */
+      result->__ctype_b = dataset->__ctype_b;
+      result->__ctype_tolower = dataset->__ctype_tolower;
+      result->__ctype_toupper = dataset->__ctype_toupper;
+    }
 
   /* It's done.  */
   __libc_lock_unlock (__libc_setlocale_lock);