Fix memory leak with FLUFL-related syntax errors (!)
This commit is contained in:
commit
f364e7b598
|
@ -190,11 +190,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;
|
||||
|
|
Loading…
Reference in New Issue