summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorAlex Henrie <alexhenrie24@gmail.com>2020-01-13 10:35:47 (GMT)
committerPablo Galindo <Pablogsal@gmail.com>2020-01-13 10:35:47 (GMT)
commit7ba6f18de2582755ae31888ba6a4237d96dddc48 (patch)
tree3db93fb3dc40b3c153cfc6c082b3339bed548c8a /Parser
parentb2b4a51f7463a0392456f7772f33223e57fa4ccc (diff)
downloadcpython-7ba6f18de2582755ae31888ba6a4237d96dddc48.zip
cpython-7ba6f18de2582755ae31888ba6a4237d96dddc48.tar.gz
cpython-7ba6f18de2582755ae31888ba6a4237d96dddc48.tar.bz2
bpo-39307: Fix memory leak on error path in parsetok (GH-17953)
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;
}