aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2015-08-19 22:17:11 -0400
committerPaul Gilbert2015-08-19 22:17:11 -0400
commita402cd31969bf245e9318255c53fde2c92671f7c (patch)
treeeb4e34b524d10304202231ba201f16a33650d77b
parentfda9955112c1206fc32569ac4500540460454ea2 (diff)
downloadscummvm-rg350-a402cd31969bf245e9318255c53fde2c92671f7c.tar.gz
scummvm-rg350-a402cd31969bf245e9318255c53fde2c92671f7c.tar.bz2
scummvm-rg350-a402cd31969bf245e9318255c53fde2c92671f7c.zip
SHERLOCK: Fix memory leak in resource manager
-rw-r--r--engines/sherlock/resources.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/sherlock/resources.cpp b/engines/sherlock/resources.cpp
index a1de73e0c0..4cdf688676 100644
--- a/engines/sherlock/resources.cpp
+++ b/engines/sherlock/resources.cpp
@@ -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;
}