From: Zackery Spytz Date: Thu, 10 Jan 2019 16:12:31 +0000 (-0700) Subject: bpo-35470: Fix a reference counting bug in _PyImport_FindExtensionObjectEx(). (GH... X-Git-Tag: v3.8.0a1~119 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=89c4f90df97f6039325e354167e8f507bf199fd9;p=thirdparty%2FPython%2Fcpython.git bpo-35470: Fix a reference counting bug in _PyImport_FindExtensionObjectEx(). (GH-11128) --- diff --git a/Python/import.c b/Python/import.c index c4f087761cd6..344f199216d0 100644 --- a/Python/import.c +++ b/Python/import.c @@ -749,7 +749,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)