mirror of https://github.com/mgba-emu/mgba.git
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) {
|
||||
SzArEx_Free(&vd->db, &vd->allocImp);
|
||||
File_Close(&vd->archiveStream.file);
|
||||
free(vd->lookStream.buf);
|
||||
free(vd);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue