summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordavygrvy <davygrvy@noemail.net>2004-05-05 18:28:39 (GMT)
committerdavygrvy <davygrvy@noemail.net>2004-05-05 18:28:39 (GMT)
commit933adac817ee23b9121b6eccb14eff81c2e43736 (patch)
treebd3a153869840305d312d74e7f45699bbfd8b20b /generic
parent1553c5bd28a26a0e114deac8f0b8bb6f01880736 (diff)
downloadtcl-933adac817ee23b9121b6eccb14eff81c2e43736.zip
tcl-933adac817ee23b9121b6eccb14eff81c2e43736.tar.gz
tcl-933adac817ee23b9121b6eccb14eff81c2e43736.tar.bz2
(TclFinalizeEncodingSubsystem): FreeEncoding(systemEncoding); moved to
before the hash table itereation as it was causing a double free attempt under some conditions. FossilOrigin-Name: debd8d0a678d556682dde3588733edebc0e6d4d0
Diffstat (limited to 'generic')
-rw-r--r--generic/tclEncoding.c4
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);
}