diff options
-rw-r--r-- | locale/setlocale.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/locale/setlocale.c b/locale/setlocale.c index 4a9f7854eb..2c8ec3d401 100644 --- a/locale/setlocale.c +++ b/locale/setlocale.c @@ -325,7 +325,8 @@ setlocale (int category, const char *locale) save_errno = errno; while (++category < LC_ALL) - if (_nl_current[category] != NULL) + if (_nl_current[category] != NULL + && newdata[category] != _nl_C[category]) _nl_free_locale (newdata[category]); else if (_nl_current[category] == NULL |