(_nl_archive_subfreeres): Call locale_data's cleanup if any.
authordrepper <drepper>
Tue, 5 Nov 2002 19:20:26 +0000 (19:20 +0000)
committerdrepper <drepper>
Tue, 5 Nov 2002 19:20:26 +0000 (19:20 +0000)
locale/loadarchive.c

index dbb4d7a..3fddc7d 100644 (file)
@@ -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;