From cbc5c7eee51b1ff97e5ddca8cae1b91fd82c2c35 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 7 Apr 2003 16:53:48 +0000 Subject: * generic/tclCmdMZ.c (TraceExecutionProc): Added missing Tcl_DiscardResult() call to avoid memory leak. --- ChangeLog | 5 +++++ generic/tclCmdMZ.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 86ab1da..818b7ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-04-07 Don Porter + + * generic/tclCmdMZ.c (TraceExecutionProc): Added missing + Tcl_DiscardResult() call to avoid memory leak. + 2003-04-07 Donal K. Fellows * generic/tclObj.c (tclWideIntType, TclInitObjSubsystem): diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 939914a..8e179ce 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.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: tclCmdMZ.c,v 1.82.2.1 2003/03/12 18:04:39 dgp Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.82.2.2 2003/04/07 16:54:11 dgp Exp $ */ #include "tclInt.h" @@ -4534,7 +4534,9 @@ TraceExecutionProc(ClientData clientData, Tcl_Interp *interp, /* Restore result if trace execution was successful */ Tcl_RestoreResult(interp, &state); iPtr->returnCode = stateCode; - } + } else { + Tcl_DiscardResult(&state); + } Tcl_DStringFree(&cmd); } -- cgit v0.12