summaryrefslogtreecommitdiffstats
path: root/generic/tclThread.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-04-24 04:34:01 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-04-24 04:34:01 (GMT)
commit3ec273770b6c93b8a1281ba9412eda19ac3d3184 (patch)
tree7c825dbeded76cc60fc9770c7f9d97f008323262 /generic/tclThread.c
parentaf15fe284aa109259d33de36b92752494e67fa73 (diff)
parentc69e73e1839416633daa84c608f5ae36091275ba (diff)
downloadtcl-3ec273770b6c93b8a1281ba9412eda19ac3d3184.zip
tcl-3ec273770b6c93b8a1281ba9412eda19ac3d3184.tar.gz
tcl-3ec273770b6c93b8a1281ba9412eda19ac3d3184.tar.bz2
[3493120] Plug memory leak in thread exit.
Diffstat (limited to 'generic/tclThread.c')
-rw-r--r--generic/tclThread.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/tclThread.c b/generic/tclThread.c
index d1f2691..8c972a8 100644
--- a/generic/tclThread.c
+++ b/generic/tclThread.c
@@ -339,8 +339,9 @@ Tcl_ConditionFinalize(
*
* TclFinalizeThreadData --
*
- * This function cleans up the thread-local storage. This is called once
- * for each thread.
+ * This function cleans up the thread-local storage. Secondary, it cleans
+ * thread alloc cache.
+ * This is called once for each thread before thread exits.
*
* Results:
* None.
@@ -355,6 +356,9 @@ void
TclFinalizeThreadData(void)
{
TclFinalizeThreadDataThread();
+#if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC)
+ TclFinalizeThreadAllocThread();
+#endif
}
/*