From e9b9aadf66f0c7684b7be580fe7fd2c9ada0089a Mon Sep 17 00:00:00 2001 From: Zackery Spytz Date: Wed, 12 Dec 2018 05:43:38 -0700 Subject: [PATCH] bpo-35470: Fix a reference counting bug in _PyImport_FindExtensionObjectEx() --- Python/import.c | 1 - 1 file changed, 1 deletion(-) diff --git a/Python/import.c b/Python/import.c index c4f087761cd65f..344f199216d09f 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)