[Scummvm-cvs-logs] CVS: scummvm/scumm sound.cpp,1.505,1.506 sound_he.cpp,2.21,2.22

kirben kirben at users.sourceforge.net
Fri Jan 27 00:40:01 CET 2006


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1220/scumm

Modified Files:
	sound.cpp sound_he.cpp 
Log Message:
Fix memory leak on exit.


Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.505
retrieving revision 1.506
diff -u -d -r1.505 -r1.506
--- sound.cpp	27 Jan 2006 06:05:03 -0000	1.505
+++ sound.cpp	27 Jan 2006 08:39:28 -0000	1.506
@@ -77,6 +77,7 @@
 	_currentMusic(0),
 	_soundsPaused(false),
 	_sfxMode(0),
+	_heMusic(0),
 	_heMusicTracks(0) {
 
 	memset(_heChannel, 0, sizeof(_heChannel));

Index: sound_he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound_he.cpp,v
retrieving revision 2.21
retrieving revision 2.22
diff -u -d -r2.21 -r2.22
--- sound_he.cpp	27 Jan 2006 06:35:54 -0000	2.21
+++ sound_he.cpp	27 Jan 2006 08:39:29 -0000	2.22
@@ -404,7 +404,7 @@
 			sound = (char *)malloc(size * 4);
 			size = voxStream->readBuffer((int16*)sound, size * 2);
 			size *= 2; // 16bits.
-			delete(voxStream);
+			delete voxStream;
 		} else {
 			// Allocate a sound buffer, copy the data into it, and play
 			sound = (char *)malloc(size);





More information about the Scummvm-git-logs mailing list