Index: generic/tclBasic.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclBasic.c,v
retrieving revision 1.41
diff -u -r1.41 tclBasic.c
--- generic/tclBasic.c	2001/11/20 22:47:58	1.41
+++ generic/tclBasic.c	2001/11/21 00:03:25
@@ -2323,7 +2323,7 @@
 	tracePtr = cmdPtr->tracePtr;
 	while (tracePtr != NULL) {
 	    CommandTrace *nextPtr = tracePtr->nextPtr;
-	    ckfree((char *) tracePtr);
+	    Tcl_EventuallyFree((ClientData) tracePtr, TCL_DYNAMIC);
 	    tracePtr = nextPtr;
 	}
 	cmdPtr->tracePtr = NULL;
@@ -2458,6 +2458,7 @@
     iPtr->activeCmdTracePtr = &active;
 
     active.cmdPtr = cmdPtr;
+    Tcl_Preserve((ClientData) iPtr);
     for (tracePtr = cmdPtr->tracePtr; tracePtr != NULL;
 	 tracePtr = active.nextTracePtr) {
 	active.nextTracePtr = tracePtr->nextPtr;
@@ -2469,9 +2470,11 @@
 	    oldName = Tcl_GetCommandName((Tcl_Interp *) iPtr, 
 					 (Tcl_Command) cmdPtr);
 	}
+	Tcl_Preserve((ClientData) tracePtr);
 	(*tracePtr->traceProc)(tracePtr->clientData,
 		(Tcl_Interp *) iPtr, oldName, newName, flags);
 	cmdPtr->flags &= ~tracePtr->flags;
+	Tcl_Release((ClientData) tracePtr);
     }
 
     /*
@@ -2482,6 +2485,7 @@
     cmdPtr->flags &= ~CMD_TRACE_ACTIVE;
     cmdPtr->refCount--;
     iPtr->activeCmdTracePtr = active.nextPtr;
+    Tcl_Release((ClientData) iPtr);
     return result;
 }
 
Index: generic/tclCmdMZ.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclCmdMZ.c,v
retrieving revision 1.49
diff -u -r1.49 tclCmdMZ.c
--- generic/tclCmdMZ.c	2001/11/19 14:35:54	1.49
+++ generic/tclCmdMZ.c	2001/11/21 00:03:25
@@ -3472,7 +3472,7 @@
     } else {
 	prevPtr->nextPtr = tracePtr->nextPtr;
     }
-    ckfree((char *) tracePtr);
+    Tcl_EventuallyFree((ClientData) tracePtr, TCL_DYNAMIC);
 }
 
 /*
