diff options
author | dgp <dgp@users.sourceforge.net> | 2008-02-28 15:59:30 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2008-02-28 15:59:30 (GMT) |
commit | c859f1ed43975d6d5d402bb1efa8e2a3fb991388 (patch) | |
tree | cd74b13fd346d5c804e71774b1a04a7479cf0bb3 | |
parent | 60ee451054fa072c36796fce1c41b63781fee85d (diff) | |
download | tcl-c859f1ed43975d6d5d402bb1efa8e2a3fb991388.zip tcl-c859f1ed43975d6d5d402bb1efa8e2a3fb991388.tar.gz tcl-c859f1ed43975d6d5d402bb1efa8e2a3fb991388.tar.bz2 |
* generic/tclCompCmds.c (TclCompileReturnCmd): The 2007-10-18 commit
to optimize compiled [return -level 0 $x] [RFE 1794073] introduced
a memory leak of the return options dictionary. Fixing that.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tclCompCmds.c | 3 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2008-02-28 Don Porter <dgp@users.sourceforge.net> + + * generic/tclCompCmds.c (TclCompileReturnCmd): The 2007-10-18 commit + to optimize compiled [return -level 0 $x] [RFE 1794073] introduced + a memory leak of the return options dictionary. Fixing that. + 2008-02-27 Pat Thoyts <patthoyts@users.sourceforge.net> * library/http/http.tcl: bug #705956 - fix inverted logic when diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 82edcd7..da97f08 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.141 2008/02/12 10:27:26 dkf Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.142 2008/02/28 15:59:34 dgp Exp $ */ #include "tclInt.h" @@ -3358,6 +3358,7 @@ TclCompileReturnCmd( /* Optimize [return -level 0 $x]. */ Tcl_DictObjSize(NULL, returnOpts, &size); if (size == 0 && level == 0 && code == TCL_OK) { + Tcl_DecrRefCount(returnOpts); return TCL_OK; } |