aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2015-05-15 19:40:28 -0400
committerPaul Gilbert2015-05-15 19:40:28 -0400
commita77c6dd43f797c33c7537df6e0cd1a79586087b5 (patch)
treeadbedb84b2944401eb75f5b5a1b16e4863dbfa8b
parent07e9262ee7f38b31743d940fa8238dbbaeede864 (diff)
downloadscummvm-rg350-a77c6dd43f797c33c7537df6e0cd1a79586087b5.tar.gz
scummvm-rg350-a77c6dd43f797c33c7537df6e0cd1a79586087b5.tar.bz2
scummvm-rg350-a77c6dd43f797c33c7537df6e0cd1a79586087b5.zip
SHERLOCK: Fix mismatched alloc/free in decompressed resource buffers
-rw-r--r--engines/sherlock/decompress.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sherlock/decompress.cpp b/engines/sherlock/decompress.cpp
index b781285471..2157d47eb8 100644
--- a/engines/sherlock/decompress.cpp
+++ b/engines/sherlock/decompress.cpp
@@ -40,7 +40,7 @@ Common::SeekableReadStream *decompressLZ(Common::SeekableReadStream &source, int
uint16 lzWindowPos;
uint16 cmd;
- byte *outBuffer = new byte[outSize];
+ byte *outBuffer = (byte *)malloc(outSize);
byte *outBufferEnd = outBuffer + outSize;
Common::MemoryReadStream *outS = new Common::MemoryReadStream(outBuffer, outSize, DisposeAfterUse::YES);