summary refs log tree commit diff
path: root/locale/loadarchive.c
diff options
context:
space:
mode:
Diffstat (limited to 'locale/loadarchive.c')
-rw-r--r--locale/loadarchive.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/locale/loadarchive.c b/locale/loadarchive.c
index dbb4d7afd5..3fddc7d05b 100644
--- a/locale/loadarchive.c
+++ b/locale/loadarchive.c
@@ -510,8 +510,13 @@ _nl_archive_subfreeres (void)
       free (dead->name);
       for (category = 0; category < __LC_LAST; ++category)
 	if (category != LC_ALL)
-	  /* _nl_unload_locale just does this free for the archive case.  */
-	  free (dead->data[category]);
+	  {
+	    /* _nl_unload_locale just does this free for the archive case.  */
+	    if (dead->data[category]->private.cleanup)
+	      (*dead->data[category]->private.cleanup) (dead->data[category]);
+
+	    free (dead->data[category]);
+	  }
       free (dead);
     }
   archloaded = NULL;