* libguile/i18n.c (scm_make_locale): Null out c_locale_name after it's
freed, so it doesn't get freed again. While this only has effect if
USE_GNU_LOCALE_API is unset, the nulling out happens in both cases,
to be consistent and robust.
(scm_nl_langinfo): Free c_result in all switch cases, in particular
P_SIGN_POSN, N_SIGN_POSN, INT_P_SIGN_POSN, and INT_N_SIGN_POSN.
c_locale = newlocale (c_category_mask, c_locale_name, c_base_locale);
free (c_locale_name);
+ c_locale_name = NULL;
if (c_locale == (locale_t) 0)
{
c_locale->category_mask = c_category_mask;
c_locale->locale_name = scm_gc_strdup (c_locale_name, "locale");
free (c_locale_name);
+ c_locale_name = NULL;
if (scm_is_eq (base_locale, SCM_VARIABLE_REF (scm_global_locale)))
{
default:
result = scm_from_latin1_symbol ("unspecified");
}
+ free (c_result);
break;
#endif