summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--generic/tclTrace.c10
2 files changed, 10 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index b6d7396..6698e2e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-16 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * generic/tclTrace.c (TclTraceExecutionObjCmd)
+ (TclTraceCommandObjCmd): fix possible mem leak in trace info.
+
2004-02-12 Mo DeJong <mdejong@users.sourceforge.net>
* win/tclWinInit.c (AppendEnvironment):
@@ -624,7 +629,7 @@
2003-11-17 Don Porter <dgp@users.sourceforge.net>
- * tests/reg.test: Added tests for [Bugs 230589, 504785, 505048, 840258]
+ * tests/reg.test: Added tests for [Bugs 230589, 504785, 505048, 840258]
recently fixed by 2003-11-15 commit to regcomp.c by Pavel Goran.
His notes on the fix: This bug results from an error in code that
splits states into "progress" and "no-progress" ones. This error
diff --git a/generic/tclTrace.c b/generic/tclTrace.c
index 021cb18..dd2422a 100644
--- a/generic/tclTrace.c
+++ b/generic/tclTrace.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclTrace.c,v 1.7 2003/12/24 04:18:20 davygrvy Exp $
+ * RCS: @(#) $Id: tclTrace.c,v 1.8 2004/02/17 04:56:01 hobbs Exp $
*/
#include "tclInt.h"
@@ -604,8 +604,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
@@ -636,6 +634,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;
@@ -807,8 +806,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
@@ -831,6 +828,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);
@@ -988,7 +986,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
@@ -1013,6 +1010,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);