summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r--generic/tclIO.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index ed94bfe..b7135e9 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -2415,6 +2415,11 @@ DiscardOutputQueued(
}
statePtr->outQueueHead = NULL;
statePtr->outQueueTail = NULL;
+ bufPtr = statePtr->curOutPtr;
+ if (bufPtr && BytesLeft(bufPtr)) {
+ statePtr->curOutPtr = NULL;
+ RecycleBuffer(statePtr, bufPtr, 0);
+ }
}
/*