about summary refs log tree commit diff
path: root/malloc
diff options
context:
space:
mode:
Diffstat (limited to 'malloc')
-rw-r--r--malloc/thread-freeres.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/malloc/thread-freeres.c b/malloc/thread-freeres.c
index c71ca4fc33..3408bdbefd 100644
--- a/malloc/thread-freeres.c
+++ b/malloc/thread-freeres.c
@@ -21,6 +21,7 @@
 #include <resolv/resolv-internal.h>
 #include <rpc/rpc.h>
 #include <string.h>
+#include <tls-internal.h>
 
 /* Thread shutdown function.  Note that this function must be called
    for threads during shutdown for correctness reasons.  Unlike
@@ -32,6 +33,7 @@ __libc_thread_freeres (void)
   call_function_static_weak (__rpc_thread_destroy);
   call_function_static_weak (__res_thread_freeres);
   call_function_static_weak (__strerror_thread_freeres);
+  __glibc_tls_internal_free ();
 
   /* This should come last because it shuts down malloc for this
      thread and the other shutdown functions might well call free.  */