diff options
author | Torbjörn Andersson | 2015-11-04 21:19:42 +0100 |
---|---|---|
committer | Torbjörn Andersson | 2015-11-04 21:19:42 +0100 |
commit | b8caa07ddb2e31cdebbbc012adbf11f721a2fd3a (patch) | |
tree | 6413a332c23ebcf228462ab5fee0f4fdfe937b26 /engines | |
parent | faff6b534def656444cac5f33d14368f8cdb3bd5 (diff) | |
download | scummvm-rg350-b8caa07ddb2e31cdebbbc012adbf11f721a2fd3a.tar.gz scummvm-rg350-b8caa07ddb2e31cdebbbc012adbf11f721a2fd3a.tar.bz2 scummvm-rg350-b8caa07ddb2e31cdebbbc012adbf11f721a2fd3a.zip |
WINTERMUTE: Fix mismatched free/delete Valgrind warning
The memory stream class uses free() to free memory, so we have to
use malloc(), not new, to allocate it.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/wintermute/base/file/base_file.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/wintermute/base/file/base_file.cpp b/engines/wintermute/base/file/base_file.cpp index 2927c908e2..4589721e7e 100644 --- a/engines/wintermute/base/file/base_file.cpp +++ b/engines/wintermute/base/file/base_file.cpp @@ -57,7 +57,7 @@ bool BaseFile::isEOF() { Common::SeekableReadStream *BaseFile::getMemStream() { uint32 oldPos = getPos(); seek(0); - byte *data = new byte[getSize()]; + byte *data = (byte *)malloc(getSize()); read(data, getSize()); seek(oldPos); Common::MemoryReadStream *memStream = new Common::MemoryReadStream(data, getSize(), DisposeAfterUse::YES); |