From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Mon, 13 Jan 2020 10:54:24 +0000 (-0800) Subject: bpo-39307: Fix memory leak on error path in parsetok (GH-17953) X-Git-Tag: v3.8.2rc1~74 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9671b6b3b3e480fbc4b14aab7008b90b38767f55;p=thirdparty%2FPython%2Fcpython.git bpo-39307: Fix memory leak on error path in parsetok (GH-17953) (cherry picked from commit 7ba6f18de2582755ae31888ba6a4237d96dddc48) Co-authored-by: Alex Henrie --- diff --git a/Parser/parsetok.c b/Parser/parsetok.c index a5d78974b871..2bb733d0dcd6 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; }