diff options
author | dgp <dgp@users.sourceforge.net> | 2012-07-24 20:18:35 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2012-07-24 20:18:35 (GMT) |
commit | 58515791c8e55bf546d15634a8caef7f41cf3d26 (patch) | |
tree | 7ba1bec4d7a58dc14e3c2478184ff4223e636207 /generic | |
parent | 821b59510a1cc1f459d8f7bbbed21d937e750493 (diff) | |
download | tcl-58515791c8e55bf546d15634a8caef7f41cf3d26.zip tcl-58515791c8e55bf546d15634a8caef7f41cf3d26.tar.gz tcl-58515791c8e55bf546d15634a8caef7f41cf3d26.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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index a1d5447..b9cd30c 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -7540,6 +7540,7 @@ TclChannelEventScriptInvoker(clientData, mask) */ Tcl_Preserve((ClientData) interp); + Tcl_Preserve((ClientData) chanPtr); result = Tcl_EvalObjEx(interp, esPtr->scriptPtr, TCL_EVAL_GLOBAL); /* @@ -7556,6 +7557,7 @@ TclChannelEventScriptInvoker(clientData, mask) } Tcl_BackgroundError(interp); } + Tcl_Release((ClientData) chanPtr); Tcl_Release((ClientData) interp); } |