summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-07-24 20:20:56 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-07-24 20:20:56 (GMT)
commitf7923a7be240b5b497b509727e27798245e12ea6 (patch)
treeb50bf04b3aa179b56cadcdf8fccdecb5bc63c75f
parent52a0980ad1493619e824df3e4e9dea91c375bd74 (diff)
parentedb3677e32a8f8ba0c8fb6eb32e2b75a1dd353df (diff)
downloadtcl-f7923a7be240b5b497b509727e27798245e12ea6.zip
tcl-f7923a7be240b5b497b509727e27798245e12ea6.tar.gz
tcl-f7923a7be240b5b497b509727e27798245e12ea6.tar.bz2
Preserve the chanPtr so that script evaluation cannot invalidate it when
we plan to use it again.
-rw-r--r--generic/tclIO.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 87d5727..2de8b53 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -8825,6 +8825,7 @@ TclChannelEventScriptInvoker(
*/
Tcl_Preserve(interp);
+ Tcl_Preserve(chanPtr);
result = Tcl_EvalObjEx(interp, esPtr->scriptPtr, TCL_EVAL_GLOBAL);
/*
@@ -8841,6 +8842,7 @@ TclChannelEventScriptInvoker(
}
Tcl_BackgroundException(interp, result);
}
+ Tcl_Release(chanPtr);
Tcl_Release(interp);
}