summaryrefslogtreecommitdiffstats
path: root/generic/tclCompExpr.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-04-24 15:36:38 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-04-24 15:36:38 (GMT)
commit729a99a663c180693e5deb7888f823e034b857e6 (patch)
tree6edf2a9601be7f6be147bf5e92b4f97a321e94d0 /generic/tclCompExpr.c
parent8caae7e907e04ff990ae4a23d275a20dc3409b2b (diff)
downloadtcl-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)]
Diffstat (limited to 'generic/tclCompExpr.c')
-rw-r--r--generic/tclCompExpr.c3
1 files changed, 2 insertions, 1 deletions
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,