]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-35470: Fix a reference counting bug in _PyImport_FindExtensionObjectEx(). (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 10 Jan 2019 16:36:50 +0000 (08:36 -0800)
committerGitHub <noreply@github.com>
Thu, 10 Jan 2019 16:36:50 +0000 (08:36 -0800)
(cherry picked from commit 89c4f90df97f6039325e354167e8f507bf199fd9)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Python/import.c

index 5f5d135c7a2ed29c621796b9add5ffff82d1ac3c..ccdd5993050543200fbc52ede8cc26660613acfc 100644 (file)
@@ -743,7 +743,6 @@ _PyImport_FindExtensionObjectEx(PyObject *name, PyObject *filename,
     }
     if (_PyState_AddModule(mod, def) < 0) {
         PyMapping_DelItem(modules, name);
-        Py_DECREF(mod);
         return NULL;
     }
     if (Py_VerboseFlag)