From 7bc8fe8ef5d4ea49ba57c11dbd72e770310d4389 Mon Sep 17 00:00:00 2001 From: David Turner Date: Wed, 29 Dec 2010 09:53:58 +0000 Subject: 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 --- engines/cine/sound.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/cine/sound.cpp') 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() { -- cgit v1.2.3