https://github.com/python/cpython/commit/8d88e8c662a80c186c7a0e67f1c1f3d4010276f8 commit: 8d88e8c662a80c186c7a0e67f1c1f3d4010276f8 branch: master author: Dino Viehland <dinoviehland at fb.com> committer: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> date: 2019年09月12日T07:38:13-07:00 summary: bpo-38138: Fix memory leak introduced by interned strings (GH-16053) Interned string needs to be decref'd https://bugs.python.org/issue38138 Automerge-Triggered-By: @matrixise files: M Python/ast.c diff --git a/Python/ast.c b/Python/ast.c index 46815c271b62..e6f71671c18e 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -630,6 +630,7 @@ new_identifier(const char *n, struct compiling *c) PyObject *args[2] = {form, id}; id2 = _PyObject_FastCall(c->c_normalize, args, 2); Py_DECREF(id); + Py_DECREF(form); if (!id2) return NULL; if (!PyUnicode_Check(id2)) {