aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorTorbjörn Andersson2010-01-20 00:01:42 +0000
committerTorbjörn Andersson2010-01-20 00:01:42 +0000
commit35580bbf790891b56e65c1239d8bd9bc5557bfca (patch)
treee08224fe59a655ae653ccbbc888ee17d58ecdf46 /engines/scumm
parenta2edf1cd1608573ccb88e4d701311f5f26148021 (diff)
downloadscummvm-rg350-35580bbf790891b56e65c1239d8bd9bc5557bfca.tar.gz
scummvm-rg350-35580bbf790891b56e65c1239d8bd9bc5557bfca.tar.bz2
scummvm-rg350-35580bbf790891b56e65c1239d8bd9bc5557bfca.zip
Fixed a small memory leak. Cppcheck again...
svn-id: r47401
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/sound.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index 988be35af8..e9aa6079b5 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -2055,6 +2055,7 @@ int ScummEngine::readSoundResourceSmallHeader(int idx) {
ptr = _res->createResource(rtSound, idx, ro_size + 2);
memcpy(ptr, "RO", 2); ptr += 2;
memcpy(ptr, src_ptr, ro_size - 4); ptr += ro_size - 4;
+ free(src_ptr);
return 1;
} else if (_game.features & GF_OLD_BUNDLE) {
wa_offs = _fileHandle->pos();