summaryrefslogtreecommitdiffstats
path: root/generic
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)
commit6e1b4d4409e68627205438f4afd1d01c4d4afee1 (patch)
treed192390029224aa5a71eb79c10e635a9d544aff9 /generic
parent27b1d801997f2288899b59b0c65dadab5cd050aa (diff)
downloadtcl-6e1b4d4409e68627205438f4afd1d01c4d4afee1.zip
tcl-6e1b4d4409e68627205438f4afd1d01c4d4afee1.tar.gz
tcl-6e1b4d4409e68627205438f4afd1d01c4d4afee1.tar.bz2
Preserve the chanPtr so that script evaluation cannot invalidate it when
we plan to use it again.
Diffstat (limited to 'generic')
-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);
}