mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-09 04:16:34 +00:00
TINSEL: Fix a leak in DW2, and a potential OOB in NextTaggedActor
svn-id: r54029
This commit is contained in:
parent
7f1a9699fa
commit
9cadcf4c5b
@ -199,6 +199,10 @@ void RegisterActors(int num) {
|
||||
void FreeActors() {
|
||||
free(actorInfo);
|
||||
actorInfo = NULL;
|
||||
if (TinselV2) {
|
||||
free(zFactors);
|
||||
zFactors = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -625,7 +629,7 @@ int NextTaggedActor() {
|
||||
PMOVER pActor;
|
||||
bool hid;
|
||||
|
||||
do {
|
||||
while (ti < NumActors); {
|
||||
if (actorInfo[ti].tagged) {
|
||||
pActor = GetMover(ti+1);
|
||||
if (pActor)
|
||||
@ -637,6 +641,7 @@ int NextTaggedActor() {
|
||||
return ++ti;
|
||||
}
|
||||
}
|
||||
++ti;
|
||||
} while (++ti < NumActors);
|
||||
|
||||
return 0;
|
||||
|
@ -760,6 +760,7 @@ void GlobalProcesses(uint32 numProcess, byte *pProcess) {
|
||||
*/
|
||||
void FreeGlobalProcesses() {
|
||||
delete[] pGlobalProcess;
|
||||
pGlobalProcess = 0;
|
||||
numGlobalProcess = 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user