summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-01-13 10:54:24 (GMT)
committerGitHub <noreply@github.com>2020-01-13 10:54:24 (GMT)
commit9671b6b3b3e480fbc4b14aab7008b90b38767f55 (patch)
tree7c6891195ce7f52a0779c931673ae2385e12e9a7 /Parser
parentf1f0c58d3835b63692600436c70478f638c3352f (diff)
downloadcpython-9671b6b3b3e480fbc4b14aab7008b90b38767f55.zip
cpython-9671b6b3b3e480fbc4b14aab7008b90b38767f55.tar.gz
cpython-9671b6b3b3e480fbc4b14aab7008b90b38767f55.tar.bz2
bpo-39307: Fix memory leak on error path in parsetok (GH-17953)
(cherry picked from commit 7ba6f18de2582755ae31888ba6a4237d96dddc48) Co-authored-by: Alex Henrie <alexhenrie24@gmail.com>
Diffstat (limited to 'Parser')
-rw-r--r--Parser/parsetok.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Parser/parsetok.c b/Parser/parsetok.c
index a5d7897..2bb733d 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;
}