aboutsummaryrefslogtreecommitdiff
path: root/scumm/sound.cpp
diff options
context:
space:
mode:
authorMax Horn2003-03-07 01:21:55 +0000
committerMax Horn2003-03-07 01:21:55 +0000
commitfd2e1c241302ff43c28df964a4459a304c60ba7e (patch)
treeb986ef6261ec6fdb2e00ebba4cd18055ffbf4735 /scumm/sound.cpp
parent8e3ddcf84f459154090451ae5ebfcfed3b09f068 (diff)
downloadscummvm-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.cpp1
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");