diff options
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/resource.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index 3e50fc1082..48278e35a7 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -1367,6 +1367,7 @@ void ResourceManager::processPatch(ResourceSource *source, ResourceType resource if (!file->open(source->getLocationName())) { warning("ResourceManager::processPatch(): failed to open %s", source->getLocationName().c_str()); delete source; + delete file; return; } fileStream = file; @@ -1376,6 +1377,7 @@ void ResourceManager::processPatch(ResourceSource *source, ResourceType resource if (fsize < 3) { debug("Patching %s failed - file too small", source->getLocationName().c_str()); delete source; + delete fileStream; return; } |