From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sun, 13 Jun 2021 07:42:43 +0000 (-0700) Subject: Fix a potential reference-counting bug in long_pow (GH-26690) (#26702) X-Git-Tag: v3.9.6~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9ee8752162d54c595b1ce4b1bebc4dff94b9c659;p=thirdparty%2FPython%2Fcpython.git Fix a potential reference-counting bug in long_pow (GH-26690) (#26702) (cherry picked from commit 59242431991794064824cf2ab70886367613f29e) Co-authored-by: Mark Dickinson Co-authored-by: Mark Dickinson --- diff --git a/Objects/longobject.c b/Objects/longobject.c index 0ff0e80cd426..cf13b2c43017 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -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: