KINGDOM: Fix memory leak. PVS-Studio V773

This commit is contained in:
sluicebox 2023-12-19 04:11:02 -08:00
parent 69271d16bf
commit 5656c999f8

View File

@ -389,6 +389,7 @@ Common::SeekableReadStream *KingdomGame::loadAResource(int reznum) {
Common::File *file = new Common::File();
if(!file->open(path)) {
warning("Failed to open %s", path.c_str());
delete file;
return nullptr;
} else {
return file;