mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-22 10:17:22 +00:00
CRUISE: Plug memory leak
This commit is contained in:
parent
afdbfe4d2f
commit
9fd172cba6
@ -249,9 +249,13 @@ int loadFile(const char* name, int idx, int destIdx) {
|
||||
int numMaxEntriesInSet = getNumMaxEntiresInSet(ptr);
|
||||
|
||||
if (destIdx > numMaxEntriesInSet) {
|
||||
MemFree(ptr);
|
||||
return 0; // exit if limit is reached
|
||||
}
|
||||
return loadSetEntry(name, ptr, destIdx, idx);
|
||||
int res = loadSetEntry(name, ptr, destIdx, idx);
|
||||
MemFree(ptr);
|
||||
|
||||
return res;
|
||||
}
|
||||
case type_FNT: {
|
||||
return loadFNTSub(ptr, idx);
|
||||
|
Loading…
x
Reference in New Issue
Block a user