summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-07-24 20:14:23 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-07-24 20:14:23 (GMT)
commitb6beba7a55d8c9961e696f77bc85fdbf0af964ab (patch)
treed192390029224aa5a71eb79c10e635a9d544aff9 /generic/tclIO.c
parent28d0e97048a0a5b72d187f1effaca560640d69e3 (diff)
downloadtcl-b6beba7a55d8c9961e696f77bc85fdbf0af964ab.zip
tcl-b6beba7a55d8c9961e696f77bc85fdbf0af964ab.tar.gz
tcl-b6beba7a55d8c9961e696f77bc85fdbf0af964ab.tar.bz2
Preserve the chanPtr so that script evaluation cannot invalidate it when
we plan to use it again.
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r--generic/tclIO.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index b9fa18d..eeca41b 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -8347,6 +8347,7 @@ TclChannelEventScriptInvoker(
*/
Tcl_Preserve(interp);
+ Tcl_Preserve(chanPtr);
result = Tcl_EvalObjEx(interp, esPtr->scriptPtr, TCL_EVAL_GLOBAL);
/*
@@ -8363,6 +8364,7 @@ TclChannelEventScriptInvoker(
}
TclBackgroundException(interp, result);
}
+ Tcl_Release(chanPtr);
Tcl_Release(interp);
}