https://github.com/python/cpython/commit/8c70c08f0fb5795904442e95a2987ea18aed2899 commit: 8c70c08f0fb5795904442e95a2987ea18aed2899 branch: 3.6 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: GitHub <noreply at github.com> date: 2018年11月23日T11:58:25-08:00 summary: bpo-35303: Fix a reference leak in _operator.c's methodcaller_repr(). (GH-10689) (cherry picked from commit 5b83ef71d3060e1651d3680e805f13a1049c7d6d) Co-authored-by: Zackery Spytz <zspytz at gmail.com> files: M Modules/_operator.c diff --git a/Modules/_operator.c b/Modules/_operator.c index fb8eafc6793d..af05f1c296bd 100644 --- a/Modules/_operator.c +++ b/Modules/_operator.c @@ -1057,6 +1057,7 @@ methodcaller_repr(methodcallerobject *mc) goto done; if (i >= numtotalargs) { i = -1; + Py_DECREF(onerepr); break; } PyTuple_SET_ITEM(argreprs, i, onerepr);