All: Fix several file handle leaks
Jeffrey Pfau jeffrey@endrift.com
Thu, 03 Mar 2016 00:04:15 -0800
5 files changed,
7 insertions(+),
1 deletions(-)
M
CHANGES
→
CHANGES
@@ -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.c
→
src/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.c
→
src/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.c
→
src/platform/opengl/gles2.c
@@ -880,6 +880,7 @@ }
} } } + manifest->close(manifest); ConfigurationDeinit(&description); return success; }
M
src/util/configuration.c
→
src/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) {