Skip to content

Commit

Permalink
Fix leak for # type: ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
gvanrossum committed Feb 1, 2019
1 parent 325e4ba commit ef3b9e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Parser/parsetok.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret,
}

if (type == TYPE_IGNORE) {
PyObject_FREE(str);
if (!growable_int_array_add(&type_ignores, tok->lineno)) {
err_ret->error = E_NOMEM;
break;
Expand Down

0 comments on commit ef3b9e9

Please sign in to comment.