summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2004-07-12 01:09:09 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2004-07-12 01:09:09 (GMT)
commit3824048c297c5067b5a813b3623378dc84a0b793 (patch)
treec29f0a1f5ab12c8641f13c5f30acf57f4eb81c84
parent6570e4e99c3e50d63954e31e9c6810ed2f55698c (diff)
downloadtcl-3824048c297c5067b5a813b3623378dc84a0b793.zip
tcl-3824048c297c5067b5a813b3623378dc84a0b793.tar.gz
tcl-3824048c297c5067b5a813b3623378dc84a0b793.tar.bz2
* generic/tclParse.c (Tcl_SubstObj): leak fix by dgp, release
result on error.
-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;