all repos — mgba @ ae40277f9d67b6333e1bd4c41d9c6a5a8cb60aa9

mGBA Game Boy Advance Emulator

VFS: Fix memory leak when failing to open 7z
Vicki Pfau vi@endrift.com
Mon, 03 Sep 2018 11:29:02 -0700
commit

ae40277f9d67b6333e1bd4c41d9c6a5a8cb60aa9

parent

880a86df301a93e60bf6e07eb08e5c418a71f09d

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

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

@@ -98,6 +98,7 @@

SzArEx_Init(&vd->db); SRes res = SzArEx_Open(&vd->db, &vd->lookStream.s, &vd->allocImp, &vd->allocTempImp); if (res != SZ_OK) { + SzArEx_Free(&vd->db, &vd->allocImp); File_Close(&vd->archiveStream.file); free(vd); return 0;