From 929dd817b3c6ebd8f2ab5d3b58af51acf292c590 Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Sun, 13 Jun 2021 08:58:32 +0100 Subject: [PATCH] [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 --- Objects/longobject.c | 1 + 1 file changed, 1 insertion(+) 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: -- 2.47.3