SCI: Fix memory leaks in ResourceManager

This commit is contained in:
Colin Snover 2016-07-22 12:20:54 -05:00
parent 65ca749f0a
commit a6370aa688

View file

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