mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
bpo-35879: Fix type comment leaks (GH-11728)
* Fix leak for # type: ignore * Fix the type comment leak
This commit is contained in:
parent
ac19081c26
commit
d2b4c19d53
2 changed files with 9 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue