diff options
author | dgp <dgp@users.sourceforge.net> | 2012-07-24 20:20:56 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2012-07-24 20:20:56 (GMT) |
commit | f7923a7be240b5b497b509727e27798245e12ea6 (patch) | |
tree | b50bf04b3aa179b56cadcdf8fccdecb5bc63c75f /generic/tclIO.c | |
parent | 52a0980ad1493619e824df3e4e9dea91c375bd74 (diff) | |
parent | edb3677e32a8f8ba0c8fb6eb32e2b75a1dd353df (diff) | |
download | tcl-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.
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r-- | generic/tclIO.c | 2 |
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); } |