summaryrefslogtreecommitdiff
path: root/pthread_win32_attach_detach_np.c
diff options
context:
space:
mode:
authorrpj <rpj>2003-05-15 06:15:57 +0000
committerrpj <rpj>2003-05-15 06:15:57 +0000
commit4b79461c03e0dd4656c1ad4fdca4344fb2cd1b19 (patch)
tree79f50ddd95908fd2adbb5b4954d6dbcd8b565c2e /pthread_win32_attach_detach_np.c
parent47c236236b027b25fb91feedcd0015d290eb8db2 (diff)
Fixed memory leaks caused by destructors calling pthreads routines at thread exit.
Diffstat (limited to 'pthread_win32_attach_detach_np.c')
-rw-r--r--pthread_win32_attach_detach_np.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pthread_win32_attach_detach_np.c b/pthread_win32_attach_detach_np.c
index 487bcbb..5e662b5 100644
--- a/pthread_win32_attach_detach_np.c
+++ b/pthread_win32_attach_detach_np.c
@@ -115,12 +115,12 @@ pthread_win32_process_detach_np ()
if (self != NULL &&
self->detachState == PTHREAD_CREATE_DETACHED)
{
- pthread_setspecific (ptw32_selfThreadKey, NULL);
ptw32_threadDestroy (self);
+ TlsSetValue (ptw32_selfThreadKey->key, NULL);
}
/*
- * The DLL is being unmapped into the process's address space
+ * The DLL is being unmapped from the process's address space
*/
ptw32_processTerminate ();
@@ -153,8 +153,8 @@ pthread_win32_thread_detach_np ()
if (self != NULL &&
self->detachState == PTHREAD_CREATE_DETACHED)
{
- pthread_setspecific (ptw32_selfThreadKey, NULL);
ptw32_threadDestroy (self);
+ TlsSetValue (ptw32_selfThreadKey->key, NULL);
}
}