Commit cfbd3c88 authored by Guido van Rossum's avatar Guido van Rossum

Finally plug the memory leak caused by syntax error (including

interactive EOF, which leaked *one* byte).
parent b18f645f
......@@ -154,8 +154,11 @@ parsetok(tok, g, start, err_ret)
str[len] = '\0';
if ((err_ret->error =
PyParser_AddToken(ps, (int)type, str,
tok->lineno)) != E_OK)
tok->lineno)) != E_OK) {
if (err_ret->error != E_DONE)
PyMem_DEL(str);
break;
}
}
if (err_ret->error == E_DONE) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment