[Scummvm-cvs-logs] SF.net SVN: scummvm:[46303] scummvm/trunk/engines
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Wed Dec 9 07:33:00 CET 2009
Revision: 46303
http://scummvm.svn.sourceforge.net/scummvm/?rev=46303&view=rev
Author: eriktorbjorn
Date: 2009-12-09 06:33:00 +0000 (Wed, 09 Dec 2009)
Log Message:
-----------
Fixed some simple cppcheck warnings.
Modified Paths:
--------------
scummvm/trunk/engines/sci/sfx/softseq/amiga.cpp
scummvm/trunk/engines/sword2/render.cpp
Modified: scummvm/trunk/engines/sci/sfx/softseq/amiga.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/amiga.cpp 2009-12-08 22:40:30 UTC (rev 46302)
+++ scummvm/trunk/engines/sci/sfx/softseq/amiga.cpp 2009-12-09 06:33:00 UTC (rev 46303)
@@ -433,7 +433,7 @@
if (file.read(instrument->samples, size) < (unsigned int)size) {
warning("[sfx:seq:amiga] failed to read instrument samples");
free(instrument->samples);
- free(instrument);
+ delete instrument;
return NULL;
}
@@ -449,7 +449,7 @@
if (seg_size[1] < 0) {
warning("[sfx:seq:amiga] invalid looping point");
free(instrument->samples);
- free(instrument);
+ delete instrument;
return NULL;
}
Modified: scummvm/trunk/engines/sword2/render.cpp
===================================================================
--- scummvm/trunk/engines/sword2/render.cpp 2009-12-08 22:40:30 UTC (rev 46302)
+++ scummvm/trunk/engines/sword2/render.cpp 2009-12-09 06:33:00 UTC (rev 46303)
@@ -596,8 +596,10 @@
return RDERR_OUTOFMEMORY;
_blockSurfaces[_layer] = (BlockSurface **)calloc(_xBlocks[_layer] * _yBlocks[_layer], sizeof(BlockSurface *));
- if (!_blockSurfaces[_layer])
+ if (!_blockSurfaces[_layer]) {
+ free(tileChunk);
return RDERR_OUTOFMEMORY;
+ }
// Group PSX background (64x32, when stretched vertically) tiles together,
// to make them compatible with pc version (composed by 64x64 tiles)
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