From 7ba6f18de2582755ae31888ba6a4237d96dddc48 Mon Sep 17 00:00:00 2001 From: Alex Henrie Date: Mon, 13 Jan 2020 03:35:47 -0700 Subject: [PATCH] bpo-39307: Fix memory leak on error path in parsetok (GH-17953) --- Parser/parsetok.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Parser/parsetok.c b/Parser/parsetok.c index a5d78974b87..2bb733d0dcd 100644 --- a/Parser/parsetok.c +++ b/Parser/parsetok.c @@ -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; }