[Scummvm-cvs-logs] CVS: scummvm/scumm bundle.cpp,1.41,1.42
Max Horn
fingolfin at users.sourceforge.net
Sat Jun 14 17:33:02 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv19835
Modified Files:
bundle.cpp
Log Message:
fixed leaks
Index: bundle.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/bundle.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- bundle.cpp 31 May 2003 00:18:22 -0000 1.41
+++ bundle.cpp 15 Jun 2003 00:31:58 -0000 1.42
@@ -108,10 +108,10 @@
}
Bundle::~Bundle() {
- if (_bundleVoiceTable)
free(_bundleVoiceTable);
- if (_bundleMusicTable)
free(_bundleMusicTable);
+ free(_compVoiceTable);
+ free(_compMusicTable);
}
void Bundle::initializeImcTables() {
@@ -276,9 +276,7 @@
return 0;
}
- if (_compVoiceTable)
- free(_compVoiceTable);
-
+ free(_compVoiceTable);
_compVoiceTable = (CompTable *)malloc(sizeof(CompTable) * num);
for (i = 0; i < num; i++) {
_compVoiceTable[i].offset = _voiceFile.readUint32BE();
@@ -335,8 +333,7 @@
return 0;
}
- if (_compMusicTable)
- free(_compMusicTable);
+ free(_compMusicTable);
_compMusicTable = (CompTable *)malloc(sizeof(CompTable) * num);
for (i = 0; i < num; i++) {
More information about the Scummvm-git-logs
mailing list