fix 2 use after frees in simplifyEnum found by visual studio and verified by valgrind

This commit is contained in:
Robert Reif 2011-06-03 21:50:08 -04:00
parent 1b4b4ee43e
commit a7fe9a3b50
1 changed files with 4 additions and 0 deletions

View File

@ -8005,6 +8005,7 @@ void Tokenizer::simplifyEnum()
while (start->next() != tok)
start->deleteThis();
start->deleteThis();
tok = start;
continue;
}
else if (tok->next()->str() != "{")
@ -8327,7 +8328,10 @@ void Tokenizer::simplifyEnum()
tok = tok1;
}
else
{
_tokens->deleteThis();
tok = _tokens;
}
}
}
}