summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-12-13 23:49:06 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2015-12-17 20:35:20 +0100
commitcc04ab27ba6341f46bbe094478c9af3e3706f411 (patch)
tree74e61fb1e7e9866761996ca3fee2622a82889d3b
parenteaedbdaa0877ec6d0501b8c19ad5175c80764c67 (diff)
dlclose fix
Patch is from Timo Teras Refs.: http://lists.uclibc.org/pipermail/uclibc/2012-October/047059.html http://git.alpinelinux.org/cgit/aports/tree/main/libc0.9.32/uclibc-dlclose-fix.patch
-rw-r--r--ldso/libdl/libdl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c
index 388e3c703..2c4b06411 100644
--- a/ldso/libdl/libdl.c
+++ b/ldso/libdl/libdl.c
@@ -964,8 +964,8 @@ static int do_dlclose(void *vhandle, int need_fini)
dtv_t *dtv = THREAD_DTV ();
- _dl_assert(!(dtv[tls_lmap->l_tls_modid].pointer.is_static));
- if (dtv[tls_lmap->l_tls_modid].pointer.val != TLS_DTV_UNALLOCATED) {
+ if (!(dtv[tls_lmap->l_tls_modid].pointer.is_static) &&
+ dtv[tls_lmap->l_tls_modid].pointer.val != TLS_DTV_UNALLOCATED) {
/* Note that free is called for NULL is well. We
deallocate even if it is this dtv entry we are
supposed to load. The reason is that we call