Fixed another memory leak in executionpath.cpp

This commit is contained in:
PKEuS 2012-03-31 15:03:11 +02:00
parent 57475a8d93
commit 8949464ed6
1 changed files with 3 additions and 2 deletions

View File

@ -241,9 +241,10 @@ void ExecutionPath::checkScope(const Token *tok, std::list<ExecutionPath *> &che
// it is not certain that a for/while will be executed:
for (std::list<ExecutionPath *>::iterator it = checks.begin(); it != checks.end();) {
if ((*it)->numberOfIf > 0)
if ((*it)->numberOfIf > 0) {
delete *it;
checks.erase(it++);
else
} else
++it;
}