From c859f1ed43975d6d5d402bb1efa8e2a3fb991388 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 28 Feb 2008 15:59:30 +0000 Subject: * 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. --- ChangeLog | 6 ++++++ generic/tclCompCmds.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 83efdba..d178b2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-02-28 Don Porter + + * 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 * 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; } -- cgit v0.12