Define free_mem function and add to __libc_subfreeres list.
authordrepper <drepper>
Tue, 30 Sep 1997 16:28:01 +0000 (16:28 +0000)
committerdrepper <drepper>
Tue, 30 Sep 1997 16:28:01 +0000 (16:28 +0000)
intl/finddomain.c

index 769bd93..a44197c 100644 (file)
@@ -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