Skip to content

Commit

Permalink
WAGE: Plug memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Feb 18, 2016
1 parent b01fb9f commit c3bae66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions engines/wage/script.cpp
Expand Up @@ -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");
Expand Down
1 change: 1 addition & 0 deletions engines/wage/world.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit c3bae66

Please sign in to comment.