aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorNeil Millstone2009-04-12 14:02:20 +0000
committerNeil Millstone2009-04-12 14:02:20 +0000
commitbbd423b82aa623a2fee6f5fe0864604083f809fe (patch)
treec0410f6fc1673ca00baac2cf386a1fda7bb3359d /engines/scumm
parent41bd7cd94b6c26ea06da5a2f3f0aefdf4adc5c90 (diff)
downloadscummvm-rg350-bbd423b82aa623a2fee6f5fe0864604083f809fe.tar.gz
scummvm-rg350-bbd423b82aa623a2fee6f5fe0864604083f809fe.tar.bz2
scummvm-rg350-bbd423b82aa623a2fee6f5fe0864604083f809fe.zip
Backporting fix from rev #39918: Memory leak when thumbnail header
couldn't be skipped. svn-id: r39945
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/saveload.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index da104db20c..ff359e2efc 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -680,8 +680,10 @@ bool ScummEngine::loadInfosFromSlot(const char *target, int slot, InfoStuff *stu
return false;
}
- if (!Graphics::skipThumbnailHeader(*in))
+ if (!Graphics::skipThumbnailHeader(*in)) {
+ delete in;
return false;
+ }
if (!loadInfos(in, stuff)) {
delete in;