mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-22 01:39:57 +00:00
WINTERMUTE: Fix a leak in sound-file loading.
This commit is contained in:
parent
58777682fe
commit
199425562e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user