Skip to content

Commit

Permalink
WINTERMUTE: Fix a leak in sound-file loading.
Browse files Browse the repository at this point in the history
  • Loading branch information
somaen committed Jan 24, 2013
1 parent 5877768 commit 1994255
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engines/wintermute/base/sound/base_sound_buffer.cpp
Expand Up @@ -111,7 +111,7 @@ bool BaseSoundBuffer::loadFromFile(const Common::String &filename, bool forceRel
if (Audio::loadWAVFromStream(*_file, waveSize, waveRate, waveFlags, &waveType)) {
if (waveType == 1) {
// We need to wrap the file in a substream to make sure the size is right.
_file = new Common::SeekableSubReadStream(_file, _file->pos(), waveSize + _file->pos());
_file = new Common::SeekableSubReadStream(_file, _file->pos(), waveSize + _file->pos(), DisposeAfterUse::YES);
_stream = Audio::makeRawStream(_file, waveRate, waveFlags, DisposeAfterUse::YES);
} else {
error("BSoundBuffer::LoadFromFile - WAVE not supported yet for %s with type %d", filename.c_str(), waveType);
Expand Down

0 comments on commit 1994255

Please sign in to comment.