[Scummvm-cvs-logs] SF.net SVN: scummvm: [31678] scummvm/trunk/engines/made/redreader.cpp
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Wed Apr 23 23:07:11 CEST 2008
Revision: 31678
http://scummvm.svn.sourceforge.net/scummvm/?rev=31678&view=rev
Author: eriktorbjorn
Date: 2008-04-23 14:07:11 -0700 (Wed, 23 Apr 2008)
Log Message:
-----------
This memory is released with free(), so it has to be allocated with malloc(),
not new. Fixes a Valgrind warning.
Modified Paths:
--------------
scummvm/trunk/engines/made/redreader.cpp
Modified: scummvm/trunk/engines/made/redreader.cpp
===================================================================
--- scummvm/trunk/engines/made/redreader.cpp 2008-04-23 20:56:10 UTC (rev 31677)
+++ scummvm/trunk/engines/made/redreader.cpp 2008-04-23 21:07:11 UTC (rev 31678)
@@ -39,7 +39,7 @@
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);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list