diff options
author | David Turner | 2010-12-29 09:53:58 +0000 |
---|---|---|
committer | David Turner | 2010-12-29 09:53:58 +0000 |
commit | 7bc8fe8ef5d4ea49ba57c11dbd72e770310d4389 (patch) | |
tree | 9be51df164c01b50318383cb5e40d0c176884021 | |
parent | fef667cbe976bdcbca52b786f2b7fc4929485619 (diff) | |
download | scummvm-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
-rw-r--r-- | engines/cine/sound.cpp | 2 |
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() { |