diff options
author | Eugene Sandulenko | 2016-11-13 16:36:18 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-11-13 16:36:43 +0100 |
commit | 43438fbe1365115f1a4df1a452d14677fca3c86b (patch) | |
tree | 586473b75e63f5c50f34b07c8957a60795d351ba /engines/chewy/sound.cpp | |
parent | a22e3bceac828177e720abc72773424e8a29bc72 (diff) | |
download | scummvm-rg350-43438fbe1365115f1a4df1a452d14677fca3c86b.tar.gz scummvm-rg350-43438fbe1365115f1a4df1a452d14677fca3c86b.tar.bz2 scummvm-rg350-43438fbe1365115f1a4df1a452d14677fca3c86b.zip |
CHEWY: Plug memory leaks
Diffstat (limited to 'engines/chewy/sound.cpp')
-rw-r--r-- | engines/chewy/sound.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/chewy/sound.cpp b/engines/chewy/sound.cpp index 36f2d63073..843387d1c8 100644 --- a/engines/chewy/sound.cpp +++ b/engines/chewy/sound.cpp @@ -100,7 +100,7 @@ void Sound::playMusic(int num, bool loop) { uint32 musicNum = _soundRes->getChunkCount() - 1 - num; Chunk *chunk = _soundRes->getChunk(musicNum); byte *data = _soundRes->getChunkData(musicNum); - + playMusic(data, chunk->size, loop); delete[] data; @@ -252,6 +252,8 @@ void Sound::convertTMFToMod(byte *tmfData, uint32 tmfSize, byte *modData, uint32 // TODO: 31 bytes instrument positions // TODO: notes + + free(modData); } } // End of namespace Chewy |