From: Mark Dickinson Date: Sun, 13 Jun 2021 07:58:32 +0000 (+0100) Subject: [3.10] Fix a potential reference-counting bug in long_pow (GH-26690) (GH-26703) X-Git-Tag: v3.10.0b3~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=929dd817b3c6ebd8f2ab5d3b58af51acf292c590;p=thirdparty%2FPython%2Fcpython.git [3.10] Fix a potential reference-counting bug in long_pow (GH-26690) (GH-26703) (cherry picked from commit 59242431991794064824cf2ab70886367613f29e) Co-authored-by: Mark Dickinson --- diff --git a/Objects/longobject.c b/Objects/longobject.c index e1c1191e648d..685bd56096f4 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: