summary refs log tree commit diff
path: root/intl/finddomain.c
diff options
context:
space:
mode:
Diffstat (limited to 'intl/finddomain.c')
-rw-r--r--intl/finddomain.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/intl/finddomain.c b/intl/finddomain.c
index 769bd93eee..a44197c808 100644
--- a/intl/finddomain.c
+++ b/intl/finddomain.c
@@ -197,3 +197,23 @@ _nl_find_domain (dirname, locale, domainname)
 
   return retval;
 }
+
+
+#ifdef _LIBC
+static void __attribute__ ((unused))
+free_mem (void)
+{
+  struct loaded_l10nfile *runp = _nl_loaded_domains;
+
+  while (runp != NULL)
+    {
+      struct loaded_l10nfile *here = runp;
+      if (runp->data != NULL)
+	_nl_unload_domain ((struct loaded_domain *) runp->data);
+      runp = runp->next;
+      free (here);
+    }
+}
+
+text_set_element (__libc_subfreeres, free_mem);
+#endif