VFS: Fix memory leak if attempt to open a 7z fails
This commit is contained in:
parent
3bded6d039
commit
20353fa195
@ -105,6 +105,7 @@ struct VDir* VDirOpen7z(const char* path, int flags) {
|
|||||||
if (res != SZ_OK) {
|
if (res != SZ_OK) {
|
||||||
SzArEx_Free(&vd->db, &vd->allocImp);
|
SzArEx_Free(&vd->db, &vd->allocImp);
|
||||||
File_Close(&vd->archiveStream.file);
|
File_Close(&vd->archiveStream.file);
|
||||||
|
free(vd->lookStream.buf);
|
||||||
free(vd);
|
free(vd);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user