executionpath: fix memory leak

This commit is contained in:
Stefan Weil 2011-05-19 19:31:51 +02:00 committed by Daniel Marjamäki
parent c971fa0d4b
commit 21a2a91b3c
1 changed files with 3 additions and 0 deletions

View File

@ -114,6 +114,7 @@ static void parseIfSwitchBody(const Token * const tok,
{
if (c.back()->varId == 0)
{
delete c.back();
c.pop_back();
continue;
}
@ -131,6 +132,8 @@ static void parseIfSwitchBody(const Token * const tok,
}
if (!duplicate)
newchecks.push_back(c.back());
else
delete c.back();
c.pop_back();
}