about summary refs log tree commit diff
path: root/locale/setlocale.c
diff options
context:
space:
mode:
Diffstat (limited to 'locale/setlocale.c')
-rw-r--r--locale/setlocale.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/locale/setlocale.c b/locale/setlocale.c
index 12e6569384..4eceea6446 100644
--- a/locale/setlocale.c
+++ b/locale/setlocale.c
@@ -368,7 +368,8 @@ setlocale (int category, const char *locale)
 
 	  /* We must not simply free a global locale since we have no
 	     control over the usage.  So we mark it as un-deletable.  */
-	  newdata->usage_count = MAX_USAGE_COUNT;
+	  if (newdata->usage_count != MAX_USAGE_COUNT)
+	    newdata->usage_count = MAX_USAGE_COUNT;
 	}
 
       /* Create new composite name.  */