Skip to content

Commit 5b83ef7

Browse files
ZackerySpytzserhiy-storchaka
authored andcommitted
bpo-35303: Fix a reference leak in _operator.c's methodcaller_repr(). (GH-10689)
1 parent 1d817e4 commit 5b83ef7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Modules/_operator.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,6 +1583,7 @@ methodcaller_repr(methodcallerobject *mc)
15831583
goto done;
15841584
if (i >= numtotalargs) {
15851585
i = -1;
1586+
Py_DECREF(onerepr);
15861587
break;
15871588
}
15881589
PyTuple_SET_ITEM(argreprs, i, onerepr);

0 commit comments

Comments
 (0)