[Scummvm-cvs-logs] SF.net SVN: scummvm:[55059] scummvm/trunk/engines/cine/sound.cpp

tdhs at users.sourceforge.net tdhs at users.sourceforge.net
Wed Dec 29 10:53:58 CET 2010


Revision: 55059
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55059&view=rev
Author:   tdhs
Date:     2010-12-29 09:53:58 +0000 (Wed, 29 Dec 2010)

Log Message:
-----------
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.

Modified Paths:
--------------
    scummvm/trunk/engines/cine/sound.cpp

Modified: scummvm/trunk/engines/cine/sound.cpp
===================================================================
--- scummvm/trunk/engines/cine/sound.cpp	2010-12-29 09:50:48 UTC (rev 55058)
+++ scummvm/trunk/engines/cine/sound.cpp	2010-12-29 09:53:58 UTC (rev 55059)
@@ -645,8 +645,8 @@
 			_driver->stopChannel(i);
 		}
 		_driver->stopAll();
-		unload();
 	}
+	unload();
 }
 
 void PCSoundFxPlayer::fadeOut() {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list