summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixThrd.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-10-11 21:35:27 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-10-11 21:35:27 (GMT)
commitd81daf76bdb5794b66511feb620c36e932e9ac99 (patch)
tree854ff813d51954ea09e78528d3bdc7506874c31d /unix/tclUnixThrd.c
parentf3e9f9caa3f8a7c72efbf590c1f0cc0a836d6338 (diff)
downloadtcl-d81daf76bdb5794b66511feb620c36e932e9ac99.zip
tcl-d81daf76bdb5794b66511feb620c36e932e9ac99.tar.gz
tcl-d81daf76bdb5794b66511feb620c36e932e9ac99.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 a7a294d..1841242 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -810,7 +810,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);
@@ -818,7 +819,7 @@ TclpFreeAllocCache(
} else if (initialized) {
/*
- * Called by us in TclFinalizeThreadAlloc() during the library
+ * Called by TclFinalizeThreadAlloc() during the process
* finalization initiated from Tcl_Finalize()
*/
@@ -833,7 +834,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);