about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--locale/loadarchive.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 8d7a8b4f61..adeba9268d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-08-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* locale/loadarchive.c (_nl_archive_subfreeres): Also check
+	dead->data[category] != NULL.
+
 2015-08-05  Joseph Myers  <joseph@codesourcery.com>
 
 	[BZ #18647]
diff --git a/locale/loadarchive.c b/locale/loadarchive.c
index ce5c21036c..3e18cf045b 100644
--- a/locale/loadarchive.c
+++ b/locale/loadarchive.c
@@ -515,7 +515,7 @@ _nl_archive_subfreeres (void)
 
       free (dead->name);
       for (category = 0; category < __LC_LAST; ++category)
-	if (category != LC_ALL)
+	if (category != LC_ALL && dead->data[category] != NULL)
 	  {
 	    /* _nl_unload_locale just does this free for the archive case.  */
 	    if (dead->data[category]->private.cleanup)