summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-11-27 02:53:40 (GMT)
committerhobbs <hobbs>2002-11-27 02:53:40 (GMT)
commit47eb3c6b6563c2f189a8a1c5b490b726de05f4d9 (patch)
tree7d47725e5f02a21960d2bc411acc2ea919b8f404 /generic/tclEncoding.c
parenta3b8e2126bece0f02ae7685d45fb8e06b9fa8b2a (diff)
downloadtcl-47eb3c6b6563c2f189a8a1c5b490b726de05f4d9.zip
tcl-47eb3c6b6563c2f189a8a1c5b490b726de05f4d9.tar.gz
tcl-47eb3c6b6563c2f189a8a1c5b490b726de05f4d9.tar.bz2
* generic/tclEncoding.c (TclFinalizeEncodingSubsystem): properly
cleanup all encodings by using Tcl_FirstHashEntry in the while loop.
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r--generic/tclEncoding.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 680a990..93505c3 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.14 2002/11/12 02:25:37 hobbs Exp $
+ * RCS: @(#) $Id: tclEncoding.c,v 1.15 2002/11/27 02:53:40 hobbs Exp $
*/
#include "tclInt.h"
@@ -318,9 +318,11 @@ TclFinalizeEncodingSubsystem()
/*
* Call FreeEncoding instead of doing it directly to handle refcounts
* like escape encodings use. [Bug #524674]
+ * Make sure to call Tcl_FirstHashEntry repeatedly so that all
+ * encodings are eventually cleaned up.
*/
FreeEncoding((Tcl_Encoding) Tcl_GetHashValue(hPtr));
- hPtr = Tcl_NextHashEntry(&search);
+ hPtr = Tcl_FirstHashEntry(&encodingTable, &search);
}
Tcl_DeleteHashTable(&encodingTable);
Tcl_MutexUnlock(&encodingMutex);