From: Roland McGrath Date: Sat, 22 Feb 2003 08:33:25 +0000 (+0000) Subject: 2003-02-21 Roland McGrath X-Git-Tag: cvs/glibc-2_3_2~69 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=12d7ca07e2ec81d96ed292ca0ba7922bb4d12193;p=thirdparty%2Fglibc.git 2003-02-21 Roland McGrath * pthread_create.c (start_thread): Call __libc_thread_freeres. --- diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c index bac7455af8e..40a95c6f917 100644 --- a/nptl/pthread_create.c +++ b/nptl/pthread_create.c @@ -25,6 +25,7 @@ #include #include #include +#include #include @@ -227,6 +228,8 @@ start_thread (void *arg) pd->result = pd->start_routine (pd->arg); } + /* Clean up any state libc stored in thread-local variables. */ + __libc_thread_freeres (); /* If this is the last thread we terminate the process now. We do not notify the debugger, it might just irritate it if there @@ -235,7 +238,6 @@ start_thread (void *arg) /* This was the last thread. */ exit (0); - /* Report the death of the thread if this is wanted. */ if (__builtin_expect (pd->report_events, 0)) {