mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-03 07:30:56 +00:00
KINGDOM: Fix memory leak. PVS-Studio V773
This commit is contained in:
parent
69271d16bf
commit
5656c999f8
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user