summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Parser/parsetok.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Parser/parsetok.c b/Parser/parsetok.c
index 7636a54..73e7e3c 100644
--- a/Parser/parsetok.c
+++ b/Parser/parsetok.c
@@ -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;