diff options
author | Max Horn | 2003-06-15 00:31:58 +0000 |
---|---|---|
committer | Max Horn | 2003-06-15 00:31:58 +0000 |
commit | cff3cab692fd33a289e8912988e02ac228e371a1 (patch) | |
tree | 2fddc713ae745676f2f461c6c0c8a944f291c8e5 /scumm/bundle.cpp | |
parent | 7d75334826fae998435a79591f0dc5b537fe195b (diff) | |
download | scummvm-rg350-cff3cab692fd33a289e8912988e02ac228e371a1.tar.gz scummvm-rg350-cff3cab692fd33a289e8912988e02ac228e371a1.tar.bz2 scummvm-rg350-cff3cab692fd33a289e8912988e02ac228e371a1.zip |
fixed leaks
svn-id: r8491
Diffstat (limited to 'scumm/bundle.cpp')
-rw-r--r-- | scumm/bundle.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/scumm/bundle.cpp b/scumm/bundle.cpp index 247cc99e7f..ea973fdd0f 100644 --- a/scumm/bundle.cpp +++ b/scumm/bundle.cpp @@ -108,10 +108,10 @@ Bundle::Bundle() { } Bundle::~Bundle() { - if (_bundleVoiceTable) free(_bundleVoiceTable); - if (_bundleMusicTable) free(_bundleMusicTable); + free(_compVoiceTable); + free(_compMusicTable); } void Bundle::initializeImcTables() { @@ -276,9 +276,7 @@ int32 Bundle::decompressVoiceSampleByIndex(int32 index, byte **comp_final) { 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 @@ int32 Bundle::decompressMusicSampleByIndex(int32 index, int32 number, byte *comp return 0; } - if (_compMusicTable) - free(_compMusicTable); + free(_compMusicTable); _compMusicTable = (CompTable *)malloc(sizeof(CompTable) * num); for (i = 0; i < num; i++) { |