all repos — mgba @ 1f204c8eefe74322cf49c827cbb43a12c960c994

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

1f204c8eefe74322cf49c827cbb43a12c960c994

parent

8beac67f5620196669fbef0c538e9d428c993ced

5 files changed, 7 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -17,6 +17,7 @@ - GBA Memory: Fix mirror on non-overdumped Classic NES games

- 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/gb/gb.csrc/gb/gb.c

@@ -120,6 +120,7 @@ if (gb->romVf) {

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

@@ -125,6 +125,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

@@ -880,6 +880,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) {