diff options
author | Eugene Sandulenko | 2016-02-18 10:21:19 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-02-18 10:30:34 +0100 |
commit | c3bae66b56b2258655d9d2af725f17fab94649b2 (patch) | |
tree | 5d8e766e8443bc4e350a48ce17bf6456726c75dc /engines | |
parent | b01fb9f3f32f3d61a6e0988988b303118719751f (diff) | |
download | scummvm-rg350-c3bae66b56b2258655d9d2af725f17fab94649b2.tar.gz scummvm-rg350-c3bae66b56b2258655d9d2af725f17fab94649b2.tar.bz2 scummvm-rg350-c3bae66b56b2258655d9d2af725f17fab94649b2.zip |
WAGE: Plug memory leak
Diffstat (limited to 'engines')
-rw-r--r-- | engines/wage/script.cpp | 1 | ||||
-rw-r--r-- | engines/wage/world.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/engines/wage/script.cpp b/engines/wage/script.cpp index b7e77dfcca..42fde9f503 100644 --- a/engines/wage/script.cpp +++ b/engines/wage/script.cpp @@ -175,6 +175,7 @@ bool Script::execute(World *world, int loopCount, Common::String *inputText, Des Operand *op = readStringOperand(); // allows empty menu // TODO check op type is string. _engine->setMenu(op->toString()); + delete op; byte d = _data->readByte(); if (d != 0xFD) warning("Operand 0x8B (PRINT) End Byte != 0xFD"); diff --git a/engines/wage/world.cpp b/engines/wage/world.cpp index 63b77a5501..73abebc38d 100644 --- a/engines/wage/world.cpp +++ b/engines/wage/world.cpp @@ -274,6 +274,7 @@ bool World::loadWorld(Common::MacResManager *resMan) { for (uint i = 0; i < string.size() && string[i] != ';'; i++) // Read token _aboutMenuItemName += string[i]; + delete menu; delete res; } res = resMan->getResource(MKTAG('M','E','N','U'), 2004); |