summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixThrd.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-10-11 21:43:44 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-10-11 21:43:44 (GMT)
commit54c0881e9d6deab242839da14f2f4d3dfe05df5b (patch)
tree6ec54166e1a86a7d7a558c818ffc68b1a294cad1 /unix/tclUnixThrd.c
parent8fe7f3fcdf076350f36ebffa03d84955d3aab367 (diff)
parentd81daf76bdb5794b66511feb620c36e932e9ac99 (diff)
downloadtcl-54c0881e9d6deab242839da14f2f4d3dfe05df5b.zip
tcl-54c0881e9d6deab242839da14f2f4d3dfe05df5b.tar.gz
tcl-54c0881e9d6deab242839da14f2f4d3dfe05df5b.tar.bz2
Fix [3cc1d91345]: duplicate calls to TclpFreeAllocCache() on thread exists
Diffstat (limited to 'unix/tclUnixThrd.c')
-rw-r--r--unix/tclUnixThrd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index ea03332..9757e4e 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -722,7 +722,8 @@ TclpFreeAllocCache(
{
if (ptr != NULL) {
/*
- * Called by the pthread lib when a thread exits
+ * Called by TclFinalizeThreadAllocThread() during the thread
+ * finalization initiated from Tcl_FinalizeThread()
*/
TclFreeAllocCache(ptr);
@@ -730,7 +731,7 @@ TclpFreeAllocCache(
} else if (initialized) {
/*
- * Called by us in TclFinalizeThreadAlloc() during the library
+ * Called by TclFinalizeThreadAlloc() during the process
* finalization initiated from Tcl_Finalize()
*/
@@ -745,7 +746,7 @@ TclpGetAllocCache(void)
if (!initialized) {
pthread_mutex_lock(allocLockPtr);
if (!initialized) {
- pthread_key_create(&key, TclpFreeAllocCache);
+ pthread_key_create(&key, NULL);
initialized = 1;
}
pthread_mutex_unlock(allocLockPtr);