summaryrefslogtreecommitdiffstats
path: root/generic/tclIOCmd.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-04-17 20:03:38 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-04-17 20:03:38 (GMT)
commit75f7e5328ad3f05b450b89ff6f480264055b8eff (patch)
treeadaea39dd0cb146340d79b77accf700ecc4b0343 /generic/tclIOCmd.c
parente08e6f2733a5715dfd8ff6062b5787f5e3ceb728 (diff)
downloadtcl-75f7e5328ad3f05b450b89ff6f480264055b8eff.zip
tcl-75f7e5328ad3f05b450b89ff6f480264055b8eff.tar.gz
tcl-75f7e5328ad3f05b450b89ff6f480264055b8eff.tar.bz2
Plug memory leak caused by [46e7091a77b71ed7|this] commit
Diffstat (limited to 'generic/tclIOCmd.c')
-rw-r--r--generic/tclIOCmd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c
index 5a766c6..7411855 100644
--- a/generic/tclIOCmd.c
+++ b/generic/tclIOCmd.c
@@ -433,6 +433,7 @@ Tcl_ReadObjCmd(
TclChannelPreserve(chan);
charactersRead = Tcl_ReadChars(chan, resultPtr, toRead, 0);
if (charactersRead == TCL_IO_FAILURE) {
+ Tcl_DecrRefCount(resultPtr);
/*
* TIP #219.
* Capture error messages put by the driver into the bypass area and