l...@gnu.org (Ludovic Courtès) writes: > Eli Zaretskii <e...@gnu.org> skribis: > >> Sorry, that missed one more instance. Please use this patch instead. >> >> --- libguile/i18n.c~0 2014-08-08 17:05:57.262034100 +0300 >> +++ libguile/i18n.c 2014-08-10 17:20:52.073000000 +0300 >> @@ -1497,6 +1497,8 @@ SCM_DEFINE (scm_nl_langinfo, "nl-langinf >> { >> #ifdef USE_GNU_LOCALE_API >> c_result = nl_langinfo_l (c_item, c_locale); >> + if (c_result != NULL) >> + c_result = strdup (c_result); >> codeset = nl_langinfo_l (CODESET, c_locale); >> #else /* !USE_GNU_LOCALE_API */ >> /* We can't use `RUN_IN_LOCALE_SECTION ()' here because the locale >> @@ -1522,6 +1524,8 @@ SCM_DEFINE (scm_nl_langinfo, "nl-langinf >> else >> { >> c_result = nl_langinfo (c_item); >> + if (c_result != NULL) >> + c_result = strdup (c_result); >> codeset = nl_langinfo (CODESET); >> >> restore_locale_settings (&lsec_prev_locale); >> @@ -1532,12 +1536,11 @@ SCM_DEFINE (scm_nl_langinfo, "nl-langinf >> else >> { >> c_result = nl_langinfo (c_item); >> + if (c_result != NULL) >> + c_result = strdup (c_result); >> codeset = nl_langinfo (CODESET); >> } >> >> - if (c_result != NULL) >> - c_result = strdup (c_result); >> - >> unlock_locale_mutex (); >> >> if (c_result == NULL) > > Makes sense, please push.
Actually, please hold off on this. It doesn't entirely fix the problems, and I'm working on a more complete fix. Thanks, Mark