From 47eb3c6b6563c2f189a8a1c5b490b726de05f4d9 Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 27 Nov 2002 02:53:40 +0000 Subject: * generic/tclEncoding.c (TclFinalizeEncodingSubsystem): properly cleanup all encodings by using Tcl_FirstHashEntry in the while loop. --- generic/tclEncoding.c | 6 ++++-- 1 file 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); -- cgit v0.12