summaryrefslogtreecommitdiffstats
path: root/main/libc0.9.32/uclibc-dlclose-fix.patch
blob: c99cd2526c3c9cf6ca07cb50c527d92f596810db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- ./ldso/libdl/libdl.c.orig
+++ ./ldso/libdl/libdl.c
@@ -951,8 +951,8 @@
 
 					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