all repos — mgba @ 82720ca26eaac3fb42e500924cea265d2bbe4301

mGBA Game Boy Advance Emulator

All: Fix several file handle leaks
Jeffrey Pfau jeffrey@endrift.com
Thu, 03 Mar 2016 00:04:15 -0800
commit

82720ca26eaac3fb42e500924cea265d2bbe4301

parent

ce0adb6c001719a6e22e5f42af1107dad310be21

4 files changed, 6 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -13,6 +13,7 @@ - Shaders: Fix AGS-001 shader with some bad drivers

- Qt: Initialize m_useBios - GBA Serialize: Fix memory corruption bug in GBAExtdataSerialize - GBA Serialize: Fix loading savegames from savestates + - All: Fix several file handle leaks Misc: - GBA: Slightly optimize GBAProcessEvents - Qt: Add preset for DualShock 4
M src/gba/gba.csrc/gba/gba.c

@@ -123,6 +123,7 @@ if (gba->romVf) {

#ifndef _3DS gba->romVf->unmap(gba->romVf, gba->pristineRom, gba->pristineRomSize); #endif + gba->romVf->close(gba->romVf); gba->pristineRom = 0; gba->romVf = 0; }
M src/platform/opengl/gles2.csrc/platform/opengl/gles2.c

@@ -867,6 +867,7 @@ }

} } } + manifest->close(manifest); ConfigurationDeinit(&description); return success; }
M src/util/configuration.csrc/util/configuration.c

@@ -151,7 +151,9 @@ struct VFile* vf = VFileOpen(path, O_RDONLY);

if (!vf) { return false; } - return ConfigurationReadVFile(configuration, vf); + bool res = ConfigurationReadVFile(configuration, vf); + vf->close(vf); + return res; } bool ConfigurationReadVFile(struct Configuration* configuration, struct VFile* vf) {