diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tclEncoding.c | 5 | ||||
-rw-r--r-- | generic/tclUtil.c | 3 |
3 files changed, 10 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2004-12-13 Don Porter <dgp@users.sourceforge.net> + + * generic/tclEncoding.c: Plugged some memory leaks. Thanks to + * generic/tclUtil.c: Rolf Ade for reports and testing [Bug 1083082] + 2004-12-13 Kevin B. Kenny <kennykb@acm.org> * doc/clock.n: Clarify that the [clock scan] command does not diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index a525283..11cf425 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEncoding.c,v 1.31 2004/12/04 21:19:18 dgp Exp $ + * RCS: @(#) $Id: tclEncoding.c,v 1.32 2004/12/13 22:11:35 dgp Exp $ */ #include "tclInt.h" @@ -1360,6 +1360,7 @@ scan: 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 @@ InitializeEncodingSearchPath(valuePtr, lengthPtr, encodingPtr) 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); diff --git a/generic/tclUtil.c b/generic/tclUtil.c index d36aabf..6f032f6 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.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: tclUtil.c,v 1.52 2004/12/02 23:24:57 dgp Exp $ + * RCS: @(#) $Id: tclUtil.c,v 1.53 2004/12/13 22:11:35 dgp Exp $ */ #include "tclInt.h" @@ -2636,6 +2636,7 @@ FreeThreadHash(clientData) ClientData clientData; { Tcl_HashTable *tablePtr = (Tcl_HashTable *) clientData; + ClearHash(tablePtr); Tcl_DeleteHashTable(tablePtr); ckfree((char *) tablePtr); } |