bpo-35470: Fix a reference counting bug in _PyImport_FindExtensionObjectEx(). (GH-11128)

This commit is contained in:
Zackery Spytz 2019-01-10 09:12:31 -07:00 committed by Serhiy Storchaka
parent c5dc60ea85
commit 89c4f90df9
1 changed files with 0 additions and 1 deletions

View File

@ -749,7 +749,6 @@ _PyImport_FindExtensionObjectEx(PyObject *name, PyObject *filename,
} }
if (_PyState_AddModule(mod, def) < 0) { if (_PyState_AddModule(mod, def) < 0) {
PyMapping_DelItem(modules, name); PyMapping_DelItem(modules, name);
Py_DECREF(mod);
return NULL; return NULL;
} }
if (Py_VerboseFlag) if (Py_VerboseFlag)