Print this page
Thread safety fixes.
*** 83,93 ****
"%I:%M:%S %p"
};
struct locdata __posix_time_locdata = {
.l_lname = "C",
- .l_refcnt = (uint32_t)-1,
.l_data = { &lc_time_posix }
};
struct locdata *
__lc_time_load(const char *name)
--- 83,92 ----
*** 104,114 ****
ret = __part_load_locale(name, (char **)&ldata->l_data[1],
"LC_TIME", LCTIME_SIZE, LCTIME_SIZE, (const char **)ltime);
if (ret != _LDP_LOADED) {
! __locdata_release(ldata);
errno = EINVAL;
return (NULL);
}
return (ldata);
--- 103,113 ----
ret = __part_load_locale(name, (char **)&ldata->l_data[1],
"LC_TIME", LCTIME_SIZE, LCTIME_SIZE, (const char **)ltime);
if (ret != _LDP_LOADED) {
! __locdata_free(ldata);
errno = EINVAL;
return (NULL);
}
return (ldata);