VFS: Fix memory leak if attempt to open a 7z fails

This commit is contained in:
Vicki Pfau 2020-02-21 00:03:48 -08:00
parent 76f82a356a
commit fc29595a1c
1 changed files with 1 additions and 0 deletions

View File

@ -105,6 +105,7 @@ struct VDir* VDirOpen7z(const char* path, int flags) {
if (res != SZ_OK) {
SzArEx_Free(&vd->db, &vd->allocImp);
File_Close(&vd->archiveStream.file);
free(vd->lookStream.buf);
free(vd);
return 0;
}