Skip to content

Commit

Permalink
SHERLOCK: Free memory leaks from unreleased sound resources
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed May 30, 2015
1 parent 9da6a90 commit ec56344
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions engines/sherlock/music.cpp
Expand Up @@ -313,6 +313,7 @@ bool Music::playMusic(const Common::String &name) {
assert(data);

stream->read(data, dataSize);
delete stream;

// for dumping the music tracks
#if 0
Expand Down
1 change: 1 addition & 0 deletions engines/sherlock/sound.cpp
Expand Up @@ -135,6 +135,7 @@ bool Sound::playSound(const Common::String &name, WaitType waitType, int priorit
byte *data = (byte *)malloc(size);
byte *ptr = data;
stream->read(ptr, size);
delete stream;

assert(size > 2);

Expand Down

0 comments on commit ec56344

Please sign in to comment.