diff options
author | hobbs <hobbs> | 2004-02-17 04:56:00 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2004-02-17 04:56:00 (GMT) |
commit | 6a8f878ac9d38e985b0c75d96986ea6a2afbf375 (patch) | |
tree | 7a065b7971874a0933467f6fd116cd6b6644b0f3 | |
parent | 6cde6afa8eab307813b0e6847bf7e3b7af5e81a6 (diff) | |
download | tcl-6a8f878ac9d38e985b0c75d96986ea6a2afbf375.zip tcl-6a8f878ac9d38e985b0c75d96986ea6a2afbf375.tar.gz tcl-6a8f878ac9d38e985b0c75d96986ea6a2afbf375.tar.bz2 |
* generic/tclTrace.c (TclTraceExecutionObjCmd)
(TclTraceCommandObjCmd): fix possible mem leak in trace info.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | generic/tclTrace.c | 10 |
2 files changed, 10 insertions, 7 deletions
@@ -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); |