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
76f82a356a
commit
fc29595a1c
|
@ -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