diff options
author | Gregory Montoir | 2004-11-10 17:54:51 +0000 |
---|---|---|
committer | Gregory Montoir | 2004-11-10 17:54:51 +0000 |
commit | 20d12a515e077bcdd9b6d38ee229b05c10341d1f (patch) | |
tree | 098e1657600b716666ef2e95eae8eea6377edc3a /queen/music.cpp | |
parent | 7480b7a45dc0e387ce210b84cfbb259d4fd1b174 (diff) | |
download | scummvm-rg350-20d12a515e077bcdd9b6d38ee229b05c10341d1f.tar.gz scummvm-rg350-20d12a515e077bcdd9b6d38ee229b05c10341d1f.tar.bz2 scummvm-rg350-20d12a515e077bcdd9b6d38ee229b05c10341d1f.zip |
fix potiential memory leak
svn-id: r15779
Diffstat (limited to 'queen/music.cpp')
-rw-r--r-- | queen/music.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/queen/music.cpp b/queen/music.cpp index 98054a33d6..19989e5048 100644 --- a/queen/music.cpp +++ b/queen/music.cpp @@ -42,7 +42,7 @@ static const byte mt32_to_gm[128] = { 47, 117, 127, 118, 118, 116, 115, 119, 115, 112, 55, 124, 123, 0, 14, 117 // 7x }; - MusicPlayer::MusicPlayer(MidiDriver *driver, byte *data, uint32 size) : _driver(driver), _isPlaying(false), _looping(false), _randomLoop(false), _masterVolume(192), _queuePos(0), _musicData(data), _musicDataSize(size), _passThrough(false) { + MusicPlayer::MusicPlayer(MidiDriver *driver, byte *data, uint32 size) : _driver(driver), _isPlaying(false), _looping(false), _randomLoop(false), _masterVolume(192), _queuePos(0), _musicData(data), _musicDataSize(size), _passThrough(false), _buf(0) { memset(_channel, 0, sizeof(_channel)); queueClear(); _lastSong = _currentSong = 0; @@ -59,6 +59,7 @@ static const byte mt32_to_gm[128] = { _parser->unloadMusic(); this->close(); delete _parser; + delete[] _buf; } void MusicPlayer::setVolume(int volume) { |