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 998fe5e..9197b06 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -2503,6 +2503,11 @@ DiscardOutputQueued(
}
statePtr->outQueueHead = NULL;
statePtr->outQueueTail = NULL;
+ bufPtr = statePtr->curOutPtr;
+ if (bufPtr && BytesLeft(bufPtr)) {
+ statePtr->curOutPtr = NULL;
+ RecycleBuffer(statePtr, bufPtr, 0);
+ }
}
/*