mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-04 16:38:55 +00:00
TWINE: fixed memory leak in holomap location loading
This commit is contained in:
parent
75a09f56fc
commit
15cb01c18c
@ -22,6 +22,7 @@
|
||||
|
||||
#include "twine/holomap.h"
|
||||
#include "common/memstream.h"
|
||||
#include "common/types.h"
|
||||
#include "twine/gamestate.h"
|
||||
#include "twine/hqr.h"
|
||||
#include "twine/interface.h"
|
||||
@ -45,7 +46,7 @@ bool Holomap::loadLocations() {
|
||||
return false;
|
||||
}
|
||||
|
||||
Common::MemoryReadStream stream(locationsPtr, locationsSize);
|
||||
Common::MemoryReadStream stream(locationsPtr, locationsSize, DisposeAfterUse::YES);
|
||||
_numLocations = locationsSize / sizeof(Location);
|
||||
if (_numLocations > NUM_LOCATIONS) {
|
||||
warning("Amount of locations (%i) exceeds the maximum of %i", _numLocations, NUM_LOCATIONS);
|
||||
|
Loading…
Reference in New Issue
Block a user