summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2003-04-07 16:55:02 (GMT)
committerdgp <dgp@users.sourceforge.net>2003-04-07 16:55:02 (GMT)
commit560310761c1b32d378c8e76c92218084bb5286fc (patch)
treebd786096fbc558671a92000e5d3434a84ab08ae1
parent31f1bbeb86a2c589b3e632340522620ffa049c20 (diff)
downloadtcl-560310761c1b32d378c8e76c92218084bb5286fc.zip
tcl-560310761c1b32d378c8e76c92218084bb5286fc.tar.gz
tcl-560310761c1b32d378c8e76c92218084bb5286fc.tar.bz2
* generic/tclCmdMZ.c (TraceExecutionProc): Added missing
Tcl_DiscardResult() call to avoid memory leak.
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclCmdMZ.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index f7fe127..76fa70b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-04-07 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tclCmdMZ.c (TraceExecutionProc): Added missing
+ Tcl_DiscardResult() call to avoid memory leak.
+
2003-04-07 Donal K. Fellows <zzcgudf@ernie.mvc.mcc.ac.uk>
* generic/tclDictObj.c (Tcl_DictObjCmd): Stopped compilers from
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 4e70522..b72772b 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.83 2003/03/13 02:48:52 dgp Exp $
+ * RCS: @(#) $Id: tclCmdMZ.c,v 1.84 2003/04/07 16:55:13 dgp Exp $
*/
#include "tclInt.h"
@@ -4380,7 +4380,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);
}