mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-07 11:27:44 +00:00
NANCY: Fix an alloc-dealloc mismatch in iff.cpp
IFF::getChunkStream's `dup` is free()d by way of Common::DisposablePtr<unsigned char const, Common::MemoryReadStream::CastFreeDeleter>::~DisposablePtr()
This commit is contained in:
parent
bf61247bc5
commit
de4f8ca634
@ -111,7 +111,7 @@ Common::SeekableReadStream *IFF::getChunkStream(const Common::String &id, uint i
|
||||
const byte *chunk = getChunk(stringToId(id), size, index);
|
||||
|
||||
if (chunk) {
|
||||
byte *dup = new byte[size];
|
||||
byte *dup = (byte *)malloc(size);
|
||||
memcpy(dup, chunk, size);
|
||||
return new Common::MemoryReadStream(dup, size, DisposeAfterUse::YES);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user