mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-07 10:21:31 +00:00
ASYLUM: fix memory leak
This commit is contained in:
parent
4901928d5c
commit
c368834a9e
@ -82,10 +82,14 @@ SaveStateDescriptor AsylumMetaEngine::querySaveMetaInfos(const char *target, int
|
||||
if (desc.getSaveSlot() == -1) {
|
||||
Common::InSaveFile *in(g_system->getSavefileManager()->openForLoading(getSavegameFile(slot, target)));
|
||||
|
||||
if (in && in->size()) {
|
||||
(void)(uint32)Asylum::Savegame::read(in, "Chapter");
|
||||
desc.setSaveSlot(slot);
|
||||
desc.setDescription(Asylum::Savegame::read(in, 45, "Game Name"));
|
||||
if (in) {
|
||||
if (in->size() > 60) {
|
||||
(void)(uint32)Asylum::Savegame::read(in, "Chapter");
|
||||
desc.setSaveSlot(slot);
|
||||
desc.setDescription(Asylum::Savegame::read(in, 45, "Game Name"));
|
||||
}
|
||||
|
||||
delete in;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user