Backporting fix from rev #39918: Memory leak when thumbnail header

couldn't be skipped.

svn-id: r39945
This commit is contained in:
Neil Millstone 2009-04-12 14:02:20 +00:00
parent 41bd7cd94b
commit bbd423b82a

View file

@ -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;