bpo-46407: Fix long_mod refleak (GH-31025)

This commit is contained in:
Ken Jin 2022-01-31 18:41:14 +08:00 committed by GitHub
parent 8fb3649450
commit 768569325a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -2744,7 +2744,7 @@ long_rem(PyLongObject *a, PyLongObject *b, PyLongObject **prem)
}
else {
/* Slow path using divrem. */
x_divrem(a, b, prem);
Py_XDECREF(x_divrem(a, b, prem));
if (*prem == NULL)
return -1;
}