aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb
diff options
context:
space:
mode:
authorD G Turner2019-09-13 21:50:55 +0100
committerD G Turner2019-09-13 21:50:55 +0100
commitb940fb75888666a31dae1f04aef16ffef1e8554e (patch)
tree7d823fbadc34b48a87c0a20678d9e3e121b98b5d /engines/hdb
parentdf940b17af4b8aa9216f903fa9acdf46048bd894 (diff)
downloadscummvm-rg350-b940fb75888666a31dae1f04aef16ffef1e8554e.tar.gz
scummvm-rg350-b940fb75888666a31dae1f04aef16ffef1e8554e.tar.bz2
scummvm-rg350-b940fb75888666a31dae1f04aef16ffef1e8554e.zip
HDB: Fix Major Memory Leak in File Manager Class
Diffstat (limited to 'engines/hdb')
-rw-r--r--engines/hdb/file-manager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/hdb/file-manager.cpp b/engines/hdb/file-manager.cpp
index 9c2eca1a11..31acc2dab8 100644
--- a/engines/hdb/file-manager.cpp
+++ b/engines/hdb/file-manager.cpp
@@ -135,7 +135,7 @@ Common::SeekableReadStream *FileMan::findFirstData(const char *string, DataType
// Return buffer wrapped in a MemoryReadStream, automatically
// uncompressed if it is zlib-compressed
- return Common::wrapCompressedReadStream(new Common::MemoryReadStream(buffer, file->length, DisposeAfterUse::NO), file->length);
+ return Common::wrapCompressedReadStream(new Common::MemoryReadStream(buffer, file->length, DisposeAfterUse::YES), file->length);
}
int32 FileMan::getLength(const char *string, DataType type) {