From 3824048c297c5067b5a813b3623378dc84a0b793 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 12 Jul 2004 01:09:09 +0000 Subject: * generic/tclParse.c (Tcl_SubstObj): leak fix by dgp, release result on error. --- ChangeLog | 5 +++++ generic/tclParse.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c5da103..04fae88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-07-11 Miguel Sofer + + * generic/tclParse.c (Tcl_SubstObj): leak fix by dgp, release + result on error. + 2004-07-11 Donal K. Fellows * 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; -- cgit v0.12