mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-14 16:07:39 +00:00
TESTBED: Fix memory leak on error. PVS-Studio V773
This commit is contained in:
parent
fc32df7533
commit
fa82075d8d
@ -36,6 +36,7 @@ Common::Error Videotests::videoTest(const Common::Path &path) {
|
||||
Common::File *file = new Common::File();
|
||||
if (!file->open(path)) {
|
||||
warning("Cannot open file %s", path.toString().c_str());
|
||||
delete file;
|
||||
return Common::kNoGameDataFoundError;
|
||||
}
|
||||
return videoTest(file, path.toString());
|
||||
|
Loading…
x
Reference in New Issue
Block a user