From 21b6d0ea71a6fe478c7ce14c003d6b60920f6a96 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 10 Nov 2009 20:19:02 +0000 Subject: * generic/tclBasic.c: Plug another leak in TCL_EVAL_DIRECT evaluation. --- ChangeLog | 5 ++++- generic/tclBasic.c | 18 +++++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3c22fda..3aca731 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ 2009-11-10 Don Porter - * generic/tclObj.c: Plus memory leak in TclContinuationsEnter(). + * generic/tclBasic.c: Plug another leak in TCL_EVAL_DIRECT + evaluation. + + * generic/tclObj.c: Plug memory leak in TclContinuationsEnter(). [Bug 2895323] 2009-11-09 Stuart Cassoff diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 63548ea..50f1a3d 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.295.2.15 2009/11/09 22:36:39 dgp Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.295.2.16 2009/11/10 20:19:02 dgp Exp $ */ #include "tclInt.h" @@ -5236,17 +5236,17 @@ TclEvalObjEx( Tcl_DecrRefCount(ctxPtr->data.eval.path); } TclStackFree(interp, ctxPtr); + } - /* - * Now release the lock on the continuation line information, if - * any, and restore the caller's settings. - */ + /* + * Now release the lock on the continuation line information, if + * any, and restore the caller's settings. + */ - if (iPtr->scriptCLLocPtr) { - Tcl_Release (iPtr->scriptCLLocPtr); - } - iPtr->scriptCLLocPtr = saveCLLocPtr; + if (iPtr->scriptCLLocPtr) { + Tcl_Release (iPtr->scriptCLLocPtr); } + iPtr->scriptCLLocPtr = saveCLLocPtr; } else { /* * Let the compiler/engine subsystem do the evaluation. -- cgit v0.12