mirror of
https://github.com/python/cpython
synced 2026-09-29 10:30:29 +03:00
bpo-39307: Fix memory leak on error path in parsetok (GH-17953)
This commit is contained in:
parent
b2b4a51f74
commit
7ba6f18de2
1 changed files with 1 additions and 0 deletions
|
|
@ -246,6 +246,7 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret,
|
|||
|
||||
if ((ps = PyParser_New(g, start)) == NULL) {
|
||||
err_ret->error = E_NOMEM;
|
||||
growable_comment_array_deallocate(&type_ignores);
|
||||
PyTokenizer_Free(tok);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue