]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix a potential reference-counting bug in long_pow (GH-26690)
authorMark Dickinson <mdickinson@enthought.com>
Sun, 13 Jun 2021 07:19:29 +0000 (08:19 +0100)
committerGitHub <noreply@github.com>
Sun, 13 Jun 2021 07:19:29 +0000 (08:19 +0100)
Objects/longobject.c

index 5e29e9a725709327bd5dcb60eeac4b644349280b..d9127b31fd48670747e93743c8e0948a20f9b7c4 100644 (file)
@@ -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: