all repos — mgba @ 20353fa19533f68d89b168ea5f32a47e2e9d7b89

mGBA Game Boy Advance Emulator

VFS: Fix memory leak if attempt to open a 7z fails
Vicki Pfau vi@endrift.com
Fri, 21 Feb 2020 00:03:48 -0800
commit

20353fa19533f68d89b168ea5f32a47e2e9d7b89

parent

3bded6d039240472107d98ff0e95d4c17cc62cbc

1 files changed, 1 insertions(+), 0 deletions(-)

jump to
M src/util/vfs/vfs-lzma.csrc/util/vfs/vfs-lzma.c

@@ -105,6 +105,7 @@ SRes res = SzArEx_Open(&vd->db, &vd->lookStream.vt, &vd->allocImp, &vd->allocTempImp);

if (res != SZ_OK) { SzArEx_Free(&vd->db, &vd->allocImp); File_Close(&vd->archiveStream.file); + free(vd->lookStream.buf); free(vd); return 0; }