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

This commit is contained in:
Mark Dickinson 2021-06-13 08:19:29 +01:00 committed by GitHub
parent 17b16e13bb
commit 5924243199
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -4185,6 +4185,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: