From bf418dda292a296312061f91911c51c5ae713329 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 4 May 2002 17:12:37 +0000 Subject: (__duplocale): Update special members only when allocation succeeded. --- locale/duplocale.c | 10 +++++----- 1 file 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); -- cgit 1.4.1