[Python-checkins] [3.10] Fix a potential reference-counting bug in long_pow (GH-26690) (GH-26703)
mdickinson
webhook-mailer at python.org
Sun Jun 13 03:58:40 EDT 2021
https://github.com/python/cpython/commit/929dd817b3c6ebd8f2ab5d3b58af51acf292c590
commit: 929dd817b3c6ebd8f2ab5d3b58af51acf292c590
branch: 3.10
author: Mark Dickinson <mdickinson at enthought.com>
committer: mdickinson <dickinsm at gmail.com>
date: 2021-06-13T08:58:32+01:00
summary:
[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 <mdickinson at enthought.com>
files:
M Objects/longobject.c
diff --git a/Objects/longobject.c b/Objects/longobject.c
index e1c1191e648da..685bd56096f48 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:
More information about the Python-checkins
mailing list