diff options
author | Torbjörn Andersson | 2008-04-23 21:07:11 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2008-04-23 21:07:11 +0000 |
commit | 97932a8f32b5fefb6b6d14441a68a1b3f8e42fd7 (patch) | |
tree | 15ea07cebea1aa41887107db05c1d2ce7a3ea89f | |
parent | 718787d700558d774e3aae4901ab740eaaec571f (diff) | |
download | scummvm-rg350-97932a8f32b5fefb6b6d14441a68a1b3f8e42fd7.tar.gz scummvm-rg350-97932a8f32b5fefb6b6d14441a68a1b3f8e42fd7.tar.bz2 scummvm-rg350-97932a8f32b5fefb6b6d14441a68a1b3f8e42fd7.zip |
This memory is released with free(), so it has to be allocated with malloc(),
not new. Fixes a Valgrind warning.
svn-id: r31678
-rw-r--r-- | engines/made/redreader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/made/redreader.cpp b/engines/made/redreader.cpp index a8694b26ec..287574c312 100644 --- a/engines/made/redreader.cpp +++ b/engines/made/redreader.cpp @@ -39,7 +39,7 @@ Common::MemoryReadStream *RedReader::load(const char *redFilename, const char *f if (!seekFile(fd, fileEntry, filename)) error("RedReader::RedReader() Could not find %s in archive %s", filename, redFilename); - byte *fileBuf = new byte[fileEntry.origSize]; + byte *fileBuf = (byte *)malloc(fileEntry.origSize); LzhDecompressor lzhDec; lzhDec.decompress(fd, fileBuf, fileEntry.compSize, fileEntry.origSize); |