[Scummvm-git-logs] scummvm master -> 60de2718bddeb1c14b3ec031d3a9fcc931bd38a3

dreammaster dreammaster at scummvm.org
Wed Jul 19 04:40:52 CEST 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
60de2718bd TITANIC: Fix new[] vs free mismatches


Commit: 60de2718bddeb1c14b3ec031d3a9fcc931bd38a3
    https://github.com/scummvm/scummvm/commit/60de2718bddeb1c14b3ec031d3a9fcc931bd38a3
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-07-18T22:40:48-04:00

Commit Message:
TITANIC: Fix new[] vs free mismatches

Changed paths:
    engines/titanic/sound/wave_file.cpp


diff --git a/engines/titanic/sound/wave_file.cpp b/engines/titanic/sound/wave_file.cpp
index c9205c7..e623220 100644
--- a/engines/titanic/sound/wave_file.cpp
+++ b/engines/titanic/sound/wave_file.cpp
@@ -93,7 +93,7 @@ CWaveFile::~CWaveFile() {
 	if (_disposeAudioBuffer == DisposeAfterUse::YES && _audioBuffer)
 		delete _audioBuffer;
 
-	delete[] _waveData;
+	free(_waveData);
 }
 
 uint CWaveFile::getDurationTicks() const {
@@ -117,7 +117,7 @@ bool CWaveFile::loadSound(const CString &name) {
 
 	Common::SeekableReadStream *stream = file.readStream();
 	uint wavSize = stream->size();
-	byte *data = new byte[wavSize];
+	byte *data = (byte *)malloc(wavSize);
 	stream->read(data, wavSize);
 
 	load(data, wavSize);





More information about the Scummvm-git-logs mailing list