diff options
author | Max Horn | 2003-03-07 01:21:55 +0000 |
---|---|---|
committer | Max Horn | 2003-03-07 01:21:55 +0000 |
commit | fd2e1c241302ff43c28df964a4459a304c60ba7e (patch) | |
tree | b986ef6261ec6fdb2e00ebba4cd18055ffbf4735 /scumm/sound.cpp | |
parent | 8e3ddcf84f459154090451ae5ebfcfed3b09f068 (diff) | |
download | scummvm-rg350-fd2e1c241302ff43c28df964a4459a304c60ba7e.tar.gz scummvm-rg350-fd2e1c241302ff43c28df964a4459a304c60ba7e.tar.bz2 scummvm-rg350-fd2e1c241302ff43c28df964a4459a304c60ba7e.zip |
fixed memory leak (1 MB each time a bundle sound was plyed... ouch)
svn-id: r6728
Diffstat (limited to 'scumm/sound.cpp')
-rw-r--r-- | scumm/sound.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp index 0360b5f761..5540a8dd56 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -1252,6 +1252,7 @@ int Sound::playBundleSound(char *sound) { byte *final = (byte *)malloc(size); memcpy(final, ptr, size); + free(ptr); if (_scumm->_actorToPrintStrFor != 0xFF && _scumm->_actorToPrintStrFor != 0) { Actor *a = _scumm->derefActorSafe(_scumm->_actorToPrintStrFor, "playBundleSound"); |