summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--generic/tclIOCmd.c4
-rw-r--r--generic/tclIORChan.c5
3 files changed, 15 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 5bc1858..069dbe6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-04-24 Kevin B. Kenny <kennykb@acm.org>
+
+ * 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.
+
2007-04-23 Daniel Steffen <das@users.sourceforge.net>
*** 8.5a6 TAGGED FOR RELEASE ***
diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c
index 542aeb6..97d11ff 100644
--- a/generic/tclIOCmd.c
+++ b/generic/tclIOCmd.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIOCmd.c,v 1.39 2007/04/02 18:48:03 dgp Exp $
+ * RCS: @(#) $Id: tclIOCmd.c,v 1.40 2007/04/24 02:42:18 kennykb Exp $
*/
#include "tclInt.h"
@@ -411,8 +411,8 @@ Tcl_ReadObjCmd(
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, "error reading \"", name, "\": ",
Tcl_PosixError(interp), NULL);
- Tcl_DecrRefCount(resultPtr);
}
+ Tcl_DecrRefCount(resultPtr);
return TCL_ERROR;
}
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 \"");