From 378391ae59eec7ab4b82def4d0f317da7577eb6a Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Tue, 3 Oct 2023 03:28:03 +0000 Subject: Fix [8259d74a64] fix --- generic/tclZipfs.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index 0f4d268..1aec819 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -6263,6 +6263,10 @@ void TclZipfsFinalize(void) * ZipFS.fileHash and ZipFS.zipHash tables. */ WriteLock(); + if (!ZipFS.initialized) { + Unlock(); + return; + } Tcl_HashEntry *hPtr; Tcl_HashSearch zipSearch; @@ -6285,7 +6289,10 @@ void TclZipfsFinalize(void) Tcl_FSUnregister(&zipfsFilesystem); Tcl_DeleteHashTable(&ZipFS.fileHash); Tcl_DeleteHashTable(&ZipFS.zipHash); - ckfree(ZipFS.fallbackEntryEncoding); + if (ZipFS.fallbackEntryEncoding) { + ckfree(ZipFS.fallbackEntryEncoding); + ZipFS.fallbackEntryEncoding = NULL; + } ZipFS.initialized = 0; } } -- cgit v0.12