Skip to content

Commit

Permalink
COMMON: Fix memory leak in decompressDCL
Browse files Browse the repository at this point in the history
  • Loading branch information
wjp committed Feb 6, 2016
1 parent 209907d commit 3e90a83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/dcl.cpp
Expand Up @@ -470,7 +470,7 @@ bool decompressDCL(ReadStream *src, byte *dest, uint32 packedSize, uint32 unpack
// Read source into memory
src->read(sourceBufferPtr, packedSize);

Common::MemoryReadStream *sourceStream = new MemoryReadStream(sourceBufferPtr, packedSize, DisposeAfterUse::NO);
Common::MemoryReadStream *sourceStream = new MemoryReadStream(sourceBufferPtr, packedSize, DisposeAfterUse::YES);
Common::MemoryWriteStream *targetStream = new MemoryWriteStream(dest, unpackedSize);

success = dcl.unpack(sourceStream, targetStream, unpackedSize, true);
Expand Down

0 comments on commit 3e90a83

Please sign in to comment.