Skip to content

Commit 7685693

Browse files
bpo-46407: Fix long_mod refleak (GH-31025)
1 parent 8fb3649 commit 7685693

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/longobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2744,7 +2744,7 @@ long_rem(PyLongObject *a, PyLongObject *b, PyLongObject **prem)
27442744
}
27452745
else {
27462746
/* Slow path using divrem. */
2747-
x_divrem(a, b, prem);
2747+
Py_XDECREF(x_divrem(a, b, prem));
27482748
if (*prem == NULL)
27492749
return -1;
27502750
}

0 commit comments

Comments
 (0)