summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-05-08 02:38:52 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-05-08 02:38:52 (GMT)
commit75e37a235a36345c619f547889a0e4663e53d599 (patch)
tree2c97d156d0b29e5eeb3c047d7d652343eeda00c0 /generic/tclIO.c
parent84a26717efe2e36e1a7e4dce9d9ffa12afe4271f (diff)
downloadtcl-75e37a235a36345c619f547889a0e4663e53d599.zip
tcl-75e37a235a36345c619f547889a0e4663e53d599.tar.gz
tcl-75e37a235a36345c619f547889a0e4663e53d599.tar.bz2
Stop leak in iocmd-21.22.
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r--generic/tclIO.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index f2d1f44..4628e90 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -3607,6 +3607,7 @@ static int WillRead(Channel *chanPtr)
{
if (chanPtr->typePtr == NULL) {
/* Prevent read attempts on a closed channel */
+ DiscardInputQueued(chanPtr->state, 0);
Tcl_SetErrno(EINVAL);
return -1;
}