SCI: Fix memory leaks in ResourceManager
This commit is contained in:
parent
65ca749f0a
commit
a6370aa688
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue