Commit 9ec2593b authored by Antoine Pitrou's avatar Antoine Pitrou

Fix memory leak with FLUFL-related syntax errors (!)

parent 7abe61f6
......@@ -183,11 +183,13 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret,
if (type == NOTEQUAL) {
if (!(ps->p_flags & CO_FUTURE_BARRY_AS_BDFL) &&
strcmp(str, "!=")) {
PyObject_FREE(str);
err_ret->error = E_SYNTAX;
break;
}
else if ((ps->p_flags & CO_FUTURE_BARRY_AS_BDFL) &&
strcmp(str, "<>")) {
PyObject_FREE(str);
err_ret->text = "with Barry as BDFL, use '<>' "
"instead of '!='";
err_ret->error = E_SYNTAX;
......
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