aboutsummaryrefslogtreecommitdiff
path: root/engines/cine/sound.cpp
diff options
context:
space:
mode:
authorDavid Turner2010-12-29 09:53:58 +0000
committerDavid Turner2010-12-29 09:53:58 +0000
commit7bc8fe8ef5d4ea49ba57c11dbd72e770310d4389 (patch)
tree9be51df164c01b50318383cb5e40d0c176884021 /engines/cine/sound.cpp
parentfef667cbe976bdcbca52b786f2b7fc4929485619 (diff)
downloadscummvm-rg350-7bc8fe8ef5d4ea49ba57c11dbd72e770310d4389.tar.gz
scummvm-rg350-7bc8fe8ef5d4ea49ba57c11dbd72e770310d4389.tar.bz2
scummvm-rg350-7bc8fe8ef5d4ea49ba57c11dbd72e770310d4389.zip
CINE: Fix Memory Leak in PCSoundFxPlayer.
Found this using Valgrind when loading a Future Wars savegame from the launcher. Occurs since the load() method called stop() but this did not unload() the allocated playing resource data unless it was still playing. Fixed in stop() by calling unload() in all cases. svn-id: r55059
Diffstat (limited to 'engines/cine/sound.cpp')
-rw-r--r--engines/cine/sound.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/cine/sound.cpp b/engines/cine/sound.cpp
index 7ba084128b..a736f3d625 100644
--- a/engines/cine/sound.cpp
+++ b/engines/cine/sound.cpp
@@ -645,8 +645,8 @@ void PCSoundFxPlayer::stop() {
_driver->stopChannel(i);
}
_driver->stopAll();
- unload();
}
+ unload();
}
void PCSoundFxPlayer::fadeOut() {