summaryrefslogtreecommitdiff
path: root/win32/perllib.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-08-21 16:22:19 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-08-21 16:22:19 +0000
commite1b5da6416e0c12378554a33f21a92b0a14593e9 (patch)
tree1f665d828a00a4c3a91b880d3564724881942ebe /win32/perllib.c
parenta4eb266fccae11165d7886ace97009e8b6569d84 (diff)
downloadperl-e1b5da6416e0c12378554a33f21a92b0a14593e9.tar.gz
free TLS slot properly on Windows
p4raw-id: //depot/perl@6748
Diffstat (limited to 'win32/perllib.c')
-rw-r--r--win32/perllib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/win32/perllib.c b/win32/perllib.c
index fae334608f..e2b245d84f 100644
--- a/win32/perllib.c
+++ b/win32/perllib.c
@@ -372,6 +372,10 @@ DllMain(HANDLE hModule, /* DLL module handle */
*/
case DLL_PROCESS_DETACH:
EndSockets();
+#if defined(USE_THREADS) || defined(USE_ITHREADS)
+ if (PL_curinterp)
+ FREE_THREAD_KEY;
+#endif
break;
/* The attached process creates a new thread. */