summary refs log tree commit diff
path: root/iconv/gconv_dl.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-01-28 16:49:20 +0000
committerUlrich Drepper <drepper@redhat.com>1999-01-28 16:49:20 +0000
commit744541835ff4c65c32cf5ce4c08b070d5f50d0ba (patch)
tree4adfa9f97c03e31d0aad5fe6f1fe30227385fb9c /iconv/gconv_dl.c
parente6df9a569331c30b85a629d3312443454273848b (diff)
downloadglibc-744541835ff4c65c32cf5ce4c08b070d5f50d0ba.tar.gz
glibc-744541835ff4c65c32cf5ce4c08b070d5f50d0ba.tar.xz
glibc-744541835ff4c65c32cf5ce4c08b070d5f50d0ba.zip
Update.
	* locale/setlocale.c (free_mem): Don't try to free C locale data
	and use setdata instead of doing it by hand.

	* iconv/gconv_conf.c (add_alias): Check that so such alias is
	currently stored.

	* iconv/gconv_db.c (free_derivation): Free names if charsets for
	first and last step.
Diffstat (limited to 'iconv/gconv_dl.c')
-rw-r--r--iconv/gconv_dl.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/iconv/gconv_dl.c b/iconv/gconv_dl.c
index 5650389c78..33f0efea90 100644
--- a/iconv/gconv_dl.c
+++ b/iconv/gconv_dl.c
@@ -254,17 +254,15 @@ __gconv_release_shlib (struct gconv_loaded_object *handle)
 
 /* We run this if we debug the memory allocation.  */
 static void
-do_release_all (const void *nodep, VISIT value, int level)
+do_release_all (void *nodep)
 {
-  struct gconv_loaded_object *obj = *(struct gconv_loaded_object **) nodep;
-
-  if (value != preorder && value != leaf)
-    return;
+  struct gconv_loaded_object *obj = (struct gconv_loaded_object *) nodep;
 
   /* Unload the shared object.  We don't use the trick to
      catch errors since in the case an error is signalled
      something is really wrong.  */
-  _dl_close (obj->handle);
+  if (obj->handle != NULL)
+    _dl_close (obj->handle);
 
   free (obj);
 }
@@ -272,6 +270,6 @@ do_release_all (const void *nodep, VISIT value, int level)
 static void __attribute__ ((unused))
 free_mem (void)
 {
-  __twalk (loaded, do_release_all);
+  __tdestroy (loaded, do_release_all);
 }
 text_set_element (__libc_subfreeres, free_mem);