Skip to content

Commit

Permalink
SHERLOCK: Fix memory leak in resource manager
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Aug 20, 2015
1 parent fda9955 commit a402cd3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions engines/sherlock/resources.cpp
Expand Up @@ -209,6 +209,8 @@ Common::SeekableReadStream *Resources::load(const Common::String &filename, cons
if (!libIndex.contains(filename)) {
if (!suppressErrors)
error("Could not find resource - %s", filename.c_str());

delete libStream;
return nullptr;
}

Expand Down

0 comments on commit a402cd3

Please sign in to comment.