From 89c4f90df97f6039325e354167e8f507bf199fd9 Mon Sep 17 00:00:00 2001 From: Zackery Spytz Date: Thu, 10 Jan 2019 09:12:31 -0700 Subject: [PATCH] bpo-35470: Fix a reference counting bug in _PyImport_FindExtensionObjectEx(). (GH-11128) --- Python/import.c | 1 - 1 file changed, 1 deletion(-) diff --git a/Python/import.c b/Python/import.c index c4f087761c..344f199216 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) -- 2.40.0