Skip to content

Commit

Permalink
Fix [8259d74a64] fix
Browse files Browse the repository at this point in the history
  • Loading branch information
apnadkarni committed Oct 3, 2023
2 parents 02bbd73 + 56f57b3 commit 244bc2b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion generic/tclZipfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -6236,6 +6236,10 @@ void TclZipfsFinalize(void)
* ZipFS.fileHash and ZipFS.zipHash tables.
*/
WriteLock();
if (!ZipFS.initialized) {
Unlock();
return;
}

Tcl_HashEntry *hPtr;
Tcl_HashSearch zipSearch;
Expand All @@ -6258,7 +6262,10 @@ void TclZipfsFinalize(void)
Tcl_FSUnregister(&zipfsFilesystem);
Tcl_DeleteHashTable(&ZipFS.fileHash);
Tcl_DeleteHashTable(&ZipFS.zipHash);
Tcl_Free(ZipFS.fallbackEntryEncoding);
if (ZipFS.fallbackEntryEncoding) {
Tcl_Free(ZipFS.fallbackEntryEncoding);
ZipFS.fallbackEntryEncoding = NULL;
}
ZipFS.initialized = 0;
}
}
Expand Down

0 comments on commit 244bc2b

Please sign in to comment.