summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorhobbs <hobbs>2004-02-17 04:54:50 (GMT)
committerhobbs <hobbs>2004-02-17 04:54:50 (GMT)
commit36fd8f61b581d7e997b9d65e92656fe72ce59230 (patch)
tree160e6e63ee69835663f24b680f0adb0ea794f10f /generic
parent89386ecbf29b87f5469b0119d7241d2c33789c81 (diff)
downloadtcl-36fd8f61b581d7e997b9d65e92656fe72ce59230.zip
tcl-36fd8f61b581d7e997b9d65e92656fe72ce59230.tar.gz
tcl-36fd8f61b581d7e997b9d65e92656fe72ce59230.tar.bz2
* generic/tclCmdMZ.c (TclTraceExecutionObjCmd)
(TclTraceCommandObjCmd): fix possible mem leak in trace info.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCmdMZ.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 45f375b..53f9cb1 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.9 2003/10/14 18:21:59 vincentdarley Exp $
+ * RCS: @(#) $Id: tclCmdMZ.c,v 1.82.2.10 2004/02/17 04:54:51 hobbs Exp $
*/
#include "tclInt.h"
@@ -3371,8 +3371,6 @@ TclTraceExecutionObjCmd(interp, optionIndex, objc, objv)
TraceCommandInfo *tcmdPtr = (TraceCommandInfo *) clientData;
- eachTraceObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-
/*
* Build a list with the ops list as the first obj
* element and the tcmdPtr->command string as the
@@ -3403,6 +3401,7 @@ TclTraceExecutionObjCmd(interp, optionIndex, objc, objv)
Tcl_DecrRefCount(elemObjPtr);
continue;
}
+ eachTraceObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
Tcl_ListObjAppendElement(NULL, eachTraceObjPtr, elemObjPtr);
Tcl_DecrRefCount(elemObjPtr);
elemObjPtr = NULL;
@@ -3578,8 +3577,6 @@ TclTraceCommandObjCmd(interp, optionIndex, objc, objv)
TraceCommandInfo *tcmdPtr = (TraceCommandInfo *) clientData;
- eachTraceObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-
/*
* Build a list with the ops list as
* the first obj element and the tcmdPtr->command string
@@ -3602,6 +3599,7 @@ TclTraceCommandObjCmd(interp, optionIndex, objc, objv)
Tcl_DecrRefCount(elemObjPtr);
continue;
}
+ eachTraceObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
Tcl_ListObjAppendElement(NULL, eachTraceObjPtr, elemObjPtr);
Tcl_DecrRefCount(elemObjPtr);
@@ -3759,7 +3757,6 @@ TclTraceVariableObjCmd(interp, optionIndex, objc, objv)
TraceVarInfo *tvarPtr = (TraceVarInfo *) clientData;
- eachTraceObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
/*
* Build a list with the ops list as
* the first obj element and the tcmdPtr->command string
@@ -3784,6 +3781,7 @@ TclTraceVariableObjCmd(interp, optionIndex, objc, objv)
Tcl_ListObjAppendElement(NULL, elemObjPtr,
Tcl_NewStringObj("unset", 5));
}
+ eachTraceObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
Tcl_ListObjAppendElement(NULL, eachTraceObjPtr, elemObjPtr);
elemObjPtr = Tcl_NewStringObj(tvarPtr->command, -1);