summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclParse.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c5da103..04fae88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-07-11 Miguel Sofer <msofer@users.sf.net>
+
+ * generic/tclParse.c (Tcl_SubstObj): leak fix by dgp, release
+ result on error.
+
2004-07-11 Donal K. Fellows <donal.k.fellows@man.ac.uk>
* generic/tclNamesp.c (BuildEnsembleConfig): Don't forget to clean
diff --git a/generic/tclParse.c b/generic/tclParse.c
index 0d580b7..4d34448 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclParse.c,v 1.36 2004/04/06 22:25:54 dgp Exp $
+ * RCS: @(#) $Id: tclParse.c,v 1.37 2004/07/12 01:09:10 msofer Exp $
*/
#include "tclInt.h"
@@ -1914,6 +1914,7 @@ Tcl_SubstObj(interp, objPtr, flags)
Tcl_FreeParse(&parse);
if (errMsg != NULL) {
if (code != TCL_BREAK) {
+ Tcl_DecrRefCount(result);
Tcl_SetObjResult(interp, errMsg);
Tcl_DecrRefCount(errMsg);
return NULL;