aboutsummaryrefslogtreecommitdiff
path: root/locale
diff options
context:
space:
mode:
Diffstat (limited to 'locale')
-rw-r--r--locale/setlocale.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/locale/setlocale.c b/locale/setlocale.c
index 0f685bc..dee83d7 100644
--- a/locale/setlocale.c
+++ b/locale/setlocale.c
@@ -402,9 +402,13 @@ free_mem (void)
{
struct locale_data *here = *_nl_current[category];
+ /* If this category is already "C" don't do anything. */
+ if (here == _nl_C[category])
+ continue;
+
/* We have to be prepared that sometime later me still might
need the locale information. */
- *_nl_current[category] = _nl_C[category];
+ setdata (category, _nl_C[category]);
setname (category, _nl_C_name);
_nl_unload_locale (here);