From: Mark Dickinson Date: Sun, 13 Jun 2021 07:19:29 +0000 (+0100) Subject: Fix a potential reference-counting bug in long_pow (GH-26690) X-Git-Tag: v3.11.0a1~866 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=59242431991794064824cf2ab70886367613f29e;p=thirdparty%2FPython%2Fcpython.git Fix a potential reference-counting bug in long_pow (GH-26690) --- diff --git a/Objects/longobject.c b/Objects/longobject.c index 5e29e9a72570..d9127b31fd48 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -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: