diff options
author | Guido van Rossum <guido@python.org> | 2019-02-01 23:28:13 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-01 23:28:13 (GMT) |
commit | d2b4c19d53f5f021fb1c7c32d48033a92ac4fe49 (patch) | |
tree | b1ca771dd7a01d8b163741ab8ef841a7bc7ebf4c /Parser | |
parent | ac19081c26eaa7de3e6aabeb789ddc2e7cdd5b24 (diff) | |
download | cpython-d2b4c19d53f5f021fb1c7c32d48033a92ac4fe49.zip cpython-d2b4c19d53f5f021fb1c7c32d48033a92ac4fe49.tar.gz cpython-d2b4c19d53f5f021fb1c7c32d48033a92ac4fe49.tar.bz2 |
bpo-35879: Fix type comment leaks (GH-11728)
* Fix leak for # type: ignore
* Fix the type comment leak
Diffstat (limited to 'Parser')
-rw-r--r-- | Parser/parsetok.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Parser/parsetok.c b/Parser/parsetok.c index 7fddc5a..1fa4a12 100644 --- a/Parser/parsetok.c +++ b/Parser/parsetok.c @@ -330,6 +330,7 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret, } if (type == TYPE_IGNORE) { + PyObject_FREE(str); if (!growable_int_array_add(&type_ignores, tok->lineno)) { err_ret->error = E_NOMEM; break; |