diff --git a/Modules/_operator.c b/Modules/_operator.c index dc678209ad3..3bf8c1276d7 100644 --- a/Modules/_operator.c +++ b/Modules/_operator.c @@ -1583,6 +1583,7 @@ methodcaller_repr(methodcallerobject *mc) goto done; if (i >= numtotalargs) { i = -1; + Py_DECREF(onerepr); break; } PyTuple_SET_ITEM(argreprs, i, onerepr);