(__duplocale): Update special members only when allocation succeeded.

This commit is contained in:
Ulrich Drepper 2002-05-04 17:12:37 +00:00
parent 74ba5a3387
commit bf418dda29

View File

@ -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;
}
/* It's done. */
__libc_lock_unlock (__libc_setlocale_lock);