Print this page
Thread safety fixes.

@@ -64,11 +64,10 @@
         .lc_ctype_mask = _DefaultRuneLocale.__runetype,
 };
 
 struct locdata __posix_ctype_locdata = {
         .l_lname = "C",
-        .l_refcnt = (uint32_t)-1,
         .l_data = { &lc_ctype_posix, &_DefaultRuneLocale }
 };
 
 
 /*

@@ -112,11 +111,11 @@
 
         (void) snprintf(path, sizeof (path), "%s/%s/LC_CTYPE/LCL_DATA",
             _PathLocale, name);
 
         if ((rl = _Read_RuneMagi(path)) == NULL) {
-                __locdata_release(ldata);
+                __locdata_free(ldata);
                 errno = EINVAL;
                 return (NULL);
         }
         ldata->l_data[1] = rl;
 

@@ -137,11 +136,11 @@
                         encodings[i].e_init(lct);
                         break;
                 }
         }
         if (encodings[i].e_name == NULL) {
-                __locdata_release(ldata);
+                __locdata_free(ldata);
                 errno = EINVAL;
                 return (NULL);
         }