Fix a potential reference-counting bug in long_pow (GH-26690) (#26702)

(cherry picked from commit 5924243199)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
This commit is contained in:
Miss Islington (bot) 2021-06-13 00:42:43 -07:00 committed by GitHub
parent a9e20cf7bb
commit 9ee8752162
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4312,6 +4312,7 @@ long_pow(PyObject *v, PyObject *w, PyObject *x)
goto Error;
Py_DECREF(a);
a = temp;
temp = NULL;
}
/* Reduce base by modulus in some cases: