mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-12 11:43:00 +00:00
TONY: Fix potential memory leak
Unfortunately, I'm not sure where and when this function is called. But this should be correct. CID 1003575
This commit is contained in:
parent
52be12830b
commit
9d28a6f531
@ -521,14 +521,15 @@ static LpItem getItemData(uint32 nOrdItem) {
|
|||||||
dat += dim;
|
dat += dim;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if we've got to the end of the file
|
|
||||||
int i = READ_LE_UINT16(dat);
|
int i = READ_LE_UINT16(dat);
|
||||||
if (i != 0xABCD)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
globalUnlock(hDat);
|
globalUnlock(hDat);
|
||||||
globalFree(hDat);
|
globalFree(hDat);
|
||||||
|
|
||||||
|
// Check if we've got to the end of the file
|
||||||
|
if (i != 0xABCD)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user