diff options
author | davygrvy <davygrvy@pobox.com> | 2004-05-05 18:28:39 (GMT) |
---|---|---|
committer | davygrvy <davygrvy@pobox.com> | 2004-05-05 18:28:39 (GMT) |
commit | 57cd30582a77f3c42c4ff32f81e825646104e29b (patch) | |
tree | bd3a153869840305d312d74e7f45699bbfd8b20b /generic | |
parent | 81290d620c01f46bb6933f7dd4bac7269b85d9f2 (diff) | |
download | tcl-57cd30582a77f3c42c4ff32f81e825646104e29b.zip tcl-57cd30582a77f3c42c4ff32f81e825646104e29b.tar.gz tcl-57cd30582a77f3c42c4ff32f81e825646104e29b.tar.bz2 |
(TclFinalizeEncodingSubsystem): FreeEncoding(systemEncoding); moved to
before the hash table itereation as it was causing a double free attempt under
some conditions.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclEncoding.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index f1781e5..23b2632 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.20 2004/04/20 02:15:55 davygrvy Exp $ + * RCS: @(#) $Id: tclEncoding.c,v 1.21 2004/05/05 18:28:39 davygrvy Exp $ */ #include "tclInt.h" @@ -313,6 +313,7 @@ TclFinalizeEncodingSubsystem() Tcl_MutexLock(&encodingMutex); encodingsInitialized = 0; + FreeEncoding(systemEncoding); hPtr = Tcl_FirstHashEntry(&encodingTable, &search); while (hPtr != NULL) { /* @@ -324,7 +325,6 @@ TclFinalizeEncodingSubsystem() FreeEncoding((Tcl_Encoding) Tcl_GetHashValue(hPtr)); hPtr = Tcl_FirstHashEntry(&encodingTable, &search); } - FreeEncoding(systemEncoding); Tcl_DeleteHashTable(&encodingTable); Tcl_MutexUnlock(&encodingMutex); } |