mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-04 08:17:40 +00:00
WINTERMUTE: Fix mismatched free/delete Valgrind warning
The memory stream class uses free() to free memory, so we have to use malloc(), not new, to allocate it.
This commit is contained in:
parent
faff6b534d
commit
b8caa07ddb
@ -57,7 +57,7 @@ bool BaseFile::isEOF() {
|
||||
Common::SeekableReadStream *BaseFile::getMemStream() {
|
||||
uint32 oldPos = getPos();
|
||||
seek(0);
|
||||
byte *data = new byte[getSize()];
|
||||
byte *data = (byte *)malloc(getSize());
|
||||
read(data, getSize());
|
||||
seek(oldPos);
|
||||
Common::MemoryReadStream *memStream = new Common::MemoryReadStream(data, getSize(), DisposeAfterUse::YES);
|
||||
|
Loading…
Reference in New Issue
Block a user