]> granicus.if.org Git - python/commitdiff
bpo-38090: Fix reference leak in ceval.c (GH-15848)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 10 Sep 2019 14:31:07 +0000 (07:31 -0700)
committerSteve Dower <steve.dower@python.org>
Tue, 10 Sep 2019 14:31:07 +0000 (15:31 +0100)
(cherry picked from commit a511c7a4961a684db1f8d0ed438822d87d7d3dcf)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Python/ceval.c

index 07ec3293adf1c4752605734a46ff00604fdddc49..3306fb9728e8cde545aac6a7c807f04403c2c2bd 100644 (file)
@@ -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 "