mirror of https://github.com/mgba-emu/mgba.git
All: Fix several file handle leaks
This commit is contained in:
parent
8beac67f56
commit
1f204c8eef
1
CHANGES
1
CHANGES
|
@ -17,6 +17,7 @@ Bugfixes:
|
|||
- 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
|
||||
|
|
|
@ -120,6 +120,7 @@ void GBUnloadROM(struct GB* gb) {
|
|||
#ifndef _3DS
|
||||
gb->romVf->unmap(gb->romVf, gb->pristineRom, gb->pristineRomSize);
|
||||
#endif
|
||||
gb->romVf->close(gb->romVf);
|
||||
gb->pristineRom = 0;
|
||||
gb->romVf = 0;
|
||||
}
|
||||
|
|
|
@ -125,6 +125,7 @@ void GBAUnloadROM(struct GBA* gba) {
|
|||
#ifndef _3DS
|
||||
gba->romVf->unmap(gba->romVf, gba->pristineRom, gba->pristineRomSize);
|
||||
#endif
|
||||
gba->romVf->close(gba->romVf);
|
||||
gba->pristineRom = 0;
|
||||
gba->romVf = 0;
|
||||
}
|
||||
|
|
|
@ -880,6 +880,7 @@ bool mGLES2ShaderLoad(struct VideoShader* shader, struct VDir* dir) {
|
|||
}
|
||||
}
|
||||
}
|
||||
manifest->close(manifest);
|
||||
ConfigurationDeinit(&description);
|
||||
return success;
|
||||
}
|
||||
|
|
|
@ -151,7 +151,9 @@ bool ConfigurationRead(struct Configuration* configuration, const char* path) {
|
|||
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) {
|
||||
|
|
Loading…
Reference in New Issue