[Python-checkins] Fix a potential reference-counting bug in long_pow (GH-26690) (#26702)
mdickinson
webhook-mailer at python.org
Sun Jun 13 03:42:51 EDT 2021
https://github.com/python/cpython/commit/9ee8752162d54c595b1ce4b1bebc4dff94b9c659
commit: 9ee8752162d54c595b1ce4b1bebc4dff94b9c659
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: mdickinson <dickinsm at gmail.com>
date: 2021-06-13T08:42:43+01:00
summary:
Fix a potential reference-counting bug in long_pow (GH-26690) (#26702)
(cherry picked from commit 59242431991794064824cf2ab70886367613f29e)
Co-authored-by: Mark Dickinson <mdickinson at enthought.com>
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 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:
More information about the Python-checkins
mailing list