Merge pull request #49013 from zaevi/fix-zip-close

Fix duplicate close file when deconstructing ZipArchive
This commit is contained in:
Rémi Verschelde 2021-05-24 11:37:45 +02:00 committed by GitHub
commit 4b4c0c0ef4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -226,9 +226,7 @@ ZipArchive::ZipArchive() {
ZipArchive::~ZipArchive() {
for (int i = 0; i < packages.size(); i++) {
FileAccess *f = (FileAccess *)unzGetOpaque(packages[i].zfile);
unzClose(packages[i].zfile);
memdelete(f);
}
packages.clear();