summaryrefslogtreecommitdiffstats
path: root/generic/tclIORChan.c
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2007-04-24 02:42:18 (GMT)
committerKevin B Kenny <kennykb@acm.org>2007-04-24 02:42:18 (GMT)
commit146814b0108455aaaafda4e59a014c6e895d5cd1 (patch)
tree3dabb44a145009e9a5d1c9fb4f2cd52dcff62ce5 /generic/tclIORChan.c
parentf5d116abda422caa1ca7f043400c43522b1fada7 (diff)
downloadtcl-146814b0108455aaaafda4e59a014c6e895d5cd1.zip
tcl-146814b0108455aaaafda4e59a014c6e895d5cd1.tar.gz
tcl-146814b0108455aaaafda4e59a014c6e895d5cd1.tar.bz2
* generic/tclIOCmd.c (Tcl_ReadObjCmd): Plugged a leak of the
buffer object if the physocal read returned an error and the bypass area had no message. * generic/tclIORChan.c (TclChanCreateObjCmd): Plugged a leak of the return value from the "initialize" method of a channel handler.
Diffstat (limited to 'generic/tclIORChan.c')
-rw-r--r--generic/tclIORChan.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c
index 66a0f50..6ddcce8 100644
--- a/generic/tclIORChan.c
+++ b/generic/tclIORChan.c
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIORChan.c,v 1.23 2007/04/23 23:07:23 kennykb Exp $
+ * RCS: @(#) $Id: tclIORChan.c,v 1.24 2007/04/24 02:42:18 kennykb Exp $
*/
#include <tclInt.h>
@@ -556,6 +556,7 @@ TclChanCreateObjCmd(
Tcl_AppendToObj(err, " initialize\" returned non-list: ", -1);
Tcl_AppendObjToObj(err, resObj);
Tcl_SetObjResult(interp, err);
+ Tcl_DecrRefCount(resObj);
goto error;
}
@@ -568,12 +569,14 @@ TclChanCreateObjCmd(
Tcl_AppendToObj(err, " initialize\" returned ", -1);
Tcl_AppendObjToObj(err, Tcl_GetObjResult(interp));
Tcl_SetObjResult(interp, err);
+ Tcl_DecrRefCount(resObj);
goto error;
}
methods |= FLAG(methIndex);
listc--;
}
+ Tcl_DecrRefCount(resObj);
if ((REQUIRED_METHODS & methods) != REQUIRED_METHODS) {
TclNewLiteralStringObj(err, "chan handler \"");