Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7ba6f18

Browse files
alexhenriepablogsal
authored andcommitted
bpo-39307: Fix memory leak on error path in parsetok (GH-17953)
1 parent b2b4a51 commit 7ba6f18

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Parser/parsetok.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret,
246246

247247
if ((ps = PyParser_New(g, start)) == NULL) {
248248
err_ret->error = E_NOMEM;
249+
growable_comment_array_deallocate(&type_ignores);
249250
PyTokenizer_Free(tok);
250251
return NULL;
251252
}

0 commit comments

Comments
 (0)