summaryrefslogtreecommitdiffstats
path: root/generic/tclIORChan.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-03-28 20:29:03 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-03-28 20:29:03 (GMT)
commitd3b630496048c958812ce8924b0b8cfc41557b39 (patch)
tree1d21904caed29ddac825462a068c419804460557 /generic/tclIORChan.c
parente29ec23cfcb4b4a117052e22d9c8b4377c5acad1 (diff)
parent06f376eefe2af7c3eb3f8131dacd6bc296a2fb71 (diff)
downloadtcl-d3b630496048c958812ce8924b0b8cfc41557b39.zip
tcl-d3b630496048c958812ce8924b0b8cfc41557b39.tar.gz
tcl-d3b630496048c958812ce8924b0b8cfc41557b39.tar.bz2
Merge minimal fix for iocmd-23.11.
Note that top channel regeneration is removed, so that Preserve/Release call pairs are sure to operate on the same pointers. Other bug fixes may need to change that.
Diffstat (limited to 'generic/tclIORChan.c')
-rw-r--r--generic/tclIORChan.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c
index cb0282a..a09a7a6 100644
--- a/generic/tclIORChan.c
+++ b/generic/tclIORChan.c
@@ -586,6 +586,7 @@ TclChanCreateObjCmd(
chan = Tcl_CreateChannel(&tclRChannelType, TclGetString(rcId), rcPtr,
mode);
rcPtr->chan = chan;
+ Tcl_Preserve(chan);
chanPtr = (Channel *) chan;
/*
@@ -2306,6 +2307,7 @@ FreeReflectedChannel(
ckfree(chanPtr->typePtr);
chanPtr->typePtr = NULL;
}
+ Tcl_Release(chanPtr);
FreeReflectedChannelArgs(rcPtr);