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 ec0c60f + 378391a commit 56f57b3
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 @@ -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;
Expand All @@ -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;
}
}
Expand Down

0 comments on commit 56f57b3

Please sign in to comment.