mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 17:29:11 +00:00
Fixed some simple cppcheck warnings.
svn-id: r46303
This commit is contained in:
parent
4218d3f037
commit
8ec098d016
@ -433,7 +433,7 @@ MidiDriver_Amiga::Instrument *MidiDriver_Amiga::readInstrument(Common::File &fil
|
||||
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 @@ MidiDriver_Amiga::Instrument *MidiDriver_Amiga::readInstrument(Common::File &fil
|
||||
if (seg_size[1] < 0) {
|
||||
warning("[sfx:seq:amiga] invalid looping point");
|
||||
free(instrument->samples);
|
||||
free(instrument);
|
||||
delete instrument;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -596,8 +596,10 @@ int32 Screen::initialisePsxBackgroundLayer(byte *parallax) {
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user