summaryrefslogtreecommitdiffstats
path: root/generic/tclThreadTest.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2018-09-28 09:18:49 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2018-09-28 09:18:49 (GMT)
commit9dabbdf40b10e3f0419d5ad5b96f4d7c3189bc6a (patch)
tree233faf46a3a4bde6f5a4c5ad45db18d7e7cdd69e /generic/tclThreadTest.c
parent0d36d5f3d85b79ed2c3565112c78bbd18d1a7990 (diff)
parent2f3fc1cfa29f6a4dac413ac62258bfb235feb257 (diff)
downloadtcl-9dabbdf40b10e3f0419d5ad5b96f4d7c3189bc6a.zip
tcl-9dabbdf40b10e3f0419d5ad5b96f4d7c3189bc6a.tar.gz
tcl-9dabbdf40b10e3f0419d5ad5b96f4d7c3189bc6a.tar.bz2
merge core-8-branch
Diffstat (limited to 'generic/tclThreadTest.c')
-rw-r--r--generic/tclThreadTest.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c
index 3a6fc43..1742eb7 100644
--- a/generic/tclThreadTest.c
+++ b/generic/tclThreadTest.c
@@ -174,7 +174,6 @@ TclThread_Init(
Tcl_CreateObjCommand(interp, "testthread", ThreadObjCmd, NULL, NULL);
return TCL_OK;
}
-
/*
*----------------------------------------------------------------------
@@ -1158,6 +1157,14 @@ ThreadExitProc(
Tcl_MutexLock(&threadMutex);
+ if (self == errorThreadId) {
+ if (errorProcString) { /* Extra safety */
+ ckfree(errorProcString);
+ errorProcString = NULL;
+ }
+ errorThreadId = 0;
+ }
+
if (threadEvalScript) {
ckfree(threadEvalScript);
threadEvalScript = NULL;