mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-03 08:11:08 +00:00
(__duplocale): Update special members only when allocation succeeded.
This commit is contained in:
parent
74ba5a3387
commit
bf418dda29
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user