From 9ee8752162d54c595b1ce4b1bebc4dff94b9c659 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Sun, 13 Jun 2021 00:42:43 -0700 Subject: [PATCH] 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 --- Objects/longobject.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Objects/longobject.c b/Objects/longobject.c index 0ff0e80cd42696..cf13b2c4301778 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: