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)
commit01c56273f977c831b1b867af3865223f35c0e6ff (patch)
tree7d47725e5f02a21960d2bc411acc2ea919b8f404 /generic/tclEncoding.c
parent11c444f1c40cfa5682b8023f09c8b9a7a48fb4a3 (diff)
downloadtcl-01c56273f977c831b1b867af3865223f35c0e6ff.zip
tcl-01c56273f977c831b1b867af3865223f35c0e6ff.tar.gz
tcl-01c56273f977c831b1b867af3865223f35c0e6ff.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);