Index: generic/tclEncoding.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclEncoding.c,v
retrieving revision 1.31
diff -u -r1.31 tclEncoding.c
--- generic/tclEncoding.c	4 Dec 2004 21:19:18 -0000	1.31
+++ generic/tclEncoding.c	13 Dec 2004 19:14:05 -0000
@@ -1360,6 +1360,7 @@
     Tcl_AppendToObj(nameObj, ".enc", -1);
     path = Tcl_FSJoinToPath(directory, 1, &nameObj);
     Tcl_DecrRefCount(directory);
+    Tcl_DecrRefCount(nameObj);
     Tcl_IncrRefCount(path);
     chan = Tcl_FSOpenFileChannel(NULL, path, "r", 0);
     Tcl_DecrRefCount(path);
@@ -3084,7 +3085,7 @@
 	if ((0 == Tcl_FSStat(path, &stat)) && S_ISDIR(stat.st_mode)) {
 	    Tcl_ListObjAppendElement(NULL, searchPath, path);
 	}
-	Tcl_IncrRefCount(path);
+	Tcl_DecrRefCount(path);
     }
     Tcl_DecrRefCount(libPath);
     Tcl_DecrRefCount(encodingObj);
Index: generic/tclUtil.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclUtil.c,v
retrieving revision 1.52
diff -u -r1.52 tclUtil.c
--- generic/tclUtil.c	2 Dec 2004 23:24:57 -0000	1.52
+++ generic/tclUtil.c	13 Dec 2004 19:14:05 -0000
@@ -2636,6 +2636,7 @@
     ClientData clientData; 
 {
     Tcl_HashTable *tablePtr = (Tcl_HashTable *) clientData;
+    ClearHash(tablePtr);
     Tcl_DeleteHashTable(tablePtr);
     ckfree((char *) tablePtr);
 }
