aboutsummaryrefslogtreecommitdiff
path: root/iconv
diff options
context:
space:
mode:
Diffstat (limited to 'iconv')
-rw-r--r--iconv/gconv_cache.c5
-rw-r--r--iconv/gconv_conf.c5
-rw-r--r--iconv/gconv_db.c5
-rw-r--r--iconv/gconv_dl.c4
4 files changed, 4 insertions, 15 deletions
diff --git a/iconv/gconv_cache.c b/iconv/gconv_cache.c
index f7dca0285a..8f92cbaf67 100644
--- a/iconv/gconv_cache.c
+++ b/iconv/gconv_cache.c
@@ -445,8 +445,7 @@ __gconv_release_cache (struct __gconv_step *steps, size_t nsteps)
/* Free all resources if necessary. */
-static void __attribute__ ((unused))
-free_mem (void)
+libc_freeres_fn (free_mem)
{
if (cache_malloced)
free (gconv_cache);
@@ -455,5 +454,3 @@ free_mem (void)
__munmap (gconv_cache, cache_size);
#endif
}
-
-text_set_element (__libc_subfreeres, free_mem);
diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c
index 8c2f4b014e..cd5055c303 100644
--- a/iconv/gconv_conf.c
+++ b/iconv/gconv_conf.c
@@ -597,11 +597,8 @@ __gconv_read_conf (void)
/* Free all resources if necessary. */
-static void __attribute__ ((unused))
-free_mem (void)
+libc_freeres_fn (free_mem)
{
if (__gconv_path_elem != NULL && __gconv_path_elem != &empty_path_elem)
free ((void *) __gconv_path_elem);
}
-
-text_set_element (__libc_subfreeres, free_mem);
diff --git a/iconv/gconv_db.c b/iconv/gconv_db.c
index 25b06d07e4..70c33df16d 100644
--- a/iconv/gconv_db.c
+++ b/iconv/gconv_db.c
@@ -778,8 +778,7 @@ free_modules_db (struct gconv_module *node)
/* Free all resources if necessary. */
-static void __attribute__ ((unused))
-free_mem (void)
+libc_freeres_fn (free_mem)
{
if (__gconv_alias_db != NULL)
__tdestroy (__gconv_alias_db, free);
@@ -790,5 +789,3 @@ free_mem (void)
if (known_derivations != NULL)
__tdestroy (known_derivations, free_derivation);
}
-
-text_set_element (__libc_subfreeres, free_mem);
diff --git a/iconv/gconv_dl.c b/iconv/gconv_dl.c
index 990338f070..ff90a54b41 100644
--- a/iconv/gconv_dl.c
+++ b/iconv/gconv_dl.c
@@ -203,12 +203,10 @@ do_release_all (void *nodep)
free (obj);
}
-static void __attribute__ ((unused))
-free_mem (void)
+libc_freeres_fn (free_mem)
{
__tdestroy (loaded, do_release_all);
}
-text_set_element (__libc_subfreeres, free_mem);
#ifdef DEBUG