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:
scummvmuser 2024-07-26 19:15:46 -04:00 committed by Kaloyan Chehlarski
parent bf61247bc5
commit de4f8ca634

View File

@ -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);
}