From 3e3d57d8490b729a80c8cd9e90475dec122dfe9e Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Thu, 10 Jan 2019 08:36:50 -0800 Subject: [PATCH] bpo-35470: Fix a reference counting bug in _PyImport_FindExtensionObjectEx(). (GH-11128) (cherry picked from commit 89c4f90df97f6039325e354167e8f507bf199fd9) Co-authored-by: Zackery Spytz --- Python/import.c | 1 - 1 file changed, 1 deletion(-) diff --git a/Python/import.c b/Python/import.c index 5f5d135c7a2e..ccdd59930505 100644 --- a/Python/import.c +++ b/Python/import.c @@ -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) -- 2.47.3