1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Merge pull request #3674 from 678098/patch-2

Fix(minizip/mztools.c): prevent file descriptor leak
This commit is contained in:
DjWarmonger 2024-03-28 11:33:54 +01:00 committed by GitHub
commit 148cfc6cbc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -285,6 +285,13 @@ uLong* bytesRecovered;
}
}
} else {
if (fpZip)
fclose(fpZip);
if (fpOut)
fclose(fpOut);
if (fpOutCD)
fclose(fpOutCD);
err = Z_STREAM_ERROR;
}
return err;