Print this page
Thread safety fixes.

@@ -45,18 +45,16 @@
         numempty        /* grouping */
 };
 
 struct locdata __posix_numeric_locdata = {
         .l_lname = "C",
-        .l_refcnt = (uint32_t)-1,
         .l_data = { &lc_numeric_posix }
 };
 
 
 /*
- * Return the locale's numeric locdata structure, places a hold on it,
- * which the caller must release.
+ * Return the locale's numeric locdata structure.
  */
 struct locdata *
 __lc_numeric_load(const char *name)
 {
         struct locdata *ldata;

@@ -71,11 +69,11 @@
 
         ret = __part_load_locale(name, (char **)&ldata->l_data[1],
             "LC_NUMERIC", LCNUMERIC_SIZE, LCNUMERIC_SIZE, (const char **)lnum);
 
         if (ret != _LDP_LOADED) {
-                __locdata_release(ldata);
+                __locdata_free(ldata);
                 return (NULL);
         }
 
         /* Can't be empty according to C99 */
         if (*lnum->decimal_point == '\0')