[Python-checkins] bpo-38090: Fix reference leak in ceval.c (GH-15848)

Steve Dower webhook-mailer at python.org
Tue Sep 10 10:31:11 EDT 2019


https://github.com/python/cpython/commit/45bc3928e232603a97451dea3106d824b0f7a392
commit: 45bc3928e232603a97451dea3106d824b0f7a392
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Steve Dower <steve.dower at python.org>
date: 2019-09-10T15:31:07+01:00
summary:

bpo-38090: Fix reference leak in ceval.c (GH-15848)

(cherry picked from commit a511c7a4961a684db1f8d0ed438822d87d7d3dcf)

Co-authored-by: Pablo Galindo <Pablogsal at gmail.com>

files:
M Python/ceval.c

diff --git a/Python/ceval.c b/Python/ceval.c
index 07ec3293adf1..3306fb9728e8 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -5238,7 +5238,6 @@ import_from(PyThreadState *tstate, PyObject *v, PyObject *name)
     else {
         _Py_IDENTIFIER(__spec__);
         PyObject *spec = _PyObject_GetAttrId(v, &PyId___spec__);
-        Py_XINCREF(spec);
         const char *fmt =
             _PyModuleSpec_IsInitializing(spec) ?
             "cannot import name %R from partially initialized module %R "



More information about the Python-checkins mailing list