summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2003-04-07 16:53:48 (GMT)
committerdgp <dgp@users.sourceforge.net>2003-04-07 16:53:48 (GMT)
commitcd31a65d929bd3ebd469ca8caab3551a8bb89879 (patch)
treeaa1f5379a1108d24b1f6236cd8a1a81e3a45ad14 /generic/tclCmdMZ.c
parentcf3465611e8960b4898e23abe5da9f474c19fd07 (diff)
downloadtcl-cd31a65d929bd3ebd469ca8caab3551a8bb89879.zip
tcl-cd31a65d929bd3ebd469ca8caab3551a8bb89879.tar.gz
tcl-cd31a65d929bd3ebd469ca8caab3551a8bb89879.tar.bz2
* generic/tclCmdMZ.c (TraceExecutionProc): Added missing
Tcl_DiscardResult() call to avoid memory leak.
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r--generic/tclCmdMZ.c6
1 files changed, 4 insertions, 2 deletions
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);
}