DIRECTOR: Fix resource leaks

This commit is contained in:
djsrv 2021-07-06 23:17:59 -04:00
parent 0294513802
commit 9ec8fbb649
2 changed files with 3 additions and 3 deletions

View File

@ -493,10 +493,9 @@ bool RIFXArchive::openStream(Common::SeekableReadStream *stream, uint32 startOff
} else {
warning("RIFXArchive::openStream(): Can not open dump file %s", buf);
}
free(dumpData);
delete dumpStream;
}
free(dumpData);
delete dumpStream;
// If we couldn't read the map, we can't do anything past this point.
if (!readMapSuccess)

View File

@ -196,6 +196,7 @@ Lingo::~Lingo() {
resetLingo();
cleanupFuncs();
cleanupMethods();
delete _compiler;
}
void Lingo::reloadBuiltIns() {