diff options
author | dgp <dgp@users.sourceforge.net> | 2007-04-24 15:36:38 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2007-04-24 15:36:38 (GMT) |
commit | 729a99a663c180693e5deb7888f823e034b857e6 (patch) | |
tree | 6edf2a9601be7f6be147bf5e92b4f97a321e94d0 | |
parent | 8caae7e907e04ff990ae4a23d275a20dc3409b2b (diff) | |
download | tcl-729a99a663c180693e5deb7888f823e034b857e6.zip tcl-729a99a663c180693e5deb7888f823e034b857e6.tar.gz tcl-729a99a663c180693e5deb7888f823e034b857e6.tar.bz2 |
* generic/tclCompExpr.c (ParseExpr): Memory leak in error case; the
literal Tcl_Obj was not getting freed. [Bug 1705778, leak #1 (new)]
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tclCompExpr.c | 3 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2007-04-24 Don Porter <dgp@users.sourceforge.net> + + * generic/tclCompExpr.c (ParseExpr): Memory leak in error case; the + literal Tcl_Obj was not getting freed. [Bug 1705778, leak #1 (new)] + 2007-04-24 Kevin B. Kenny <kennykb@acm.org> * generic/tclExecute.c (TclExecuteByteCode): Plugged six memory diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c index 6acf13e..b373969 100644 --- a/generic/tclCompExpr.c +++ b/generic/tclCompExpr.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompExpr.c,v 1.51 2007/04/23 19:04:43 kennykb Exp $ + * RCS: @(#) $Id: tclCompExpr.c,v 1.52 2007/04/24 15:36:42 dgp Exp $ */ #include "tclInt.h" @@ -310,6 +310,7 @@ ParseExpr( if (Tcl_GetBooleanFromObj(NULL, literal, &b) == TCL_OK) { lexeme = BOOLEAN; } else { + Tcl_DecrRefCount(literal); msg = Tcl_ObjPrintf( "invalid bareword \"%.*s%s\"", (scanned < limit) ? scanned : limit - 3, start, |