From d2b4c19d53f5f021fb1c7c32d48033a92ac4fe49 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 1 Feb 2019 15:28:13 -0800 Subject: bpo-35879: Fix type comment leaks (GH-11728) * Fix leak for # type: ignore * Fix the type comment leak --- Parser/parsetok.c | 1 + 1 file changed, 1 insertion(+) (limited to 'Parser') diff --git a/Parser/parsetok.c b/Parser/parsetok.c index 7fddc5a0e8..1fa4a1286b 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; -- cgit v1.2.1