From 59242431991794064824cf2ab70886367613f29e Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Sun, 13 Jun 2021 08:19:29 +0100 Subject: [PATCH] Fix a potential reference-counting bug in long_pow (GH-26690) --- Objects/longobject.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Objects/longobject.c b/Objects/longobject.c index 5e29e9a7257..d9127b31fd4 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: