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

Miss Islington (bot) webhook-mailer at python.org
Thu Jan 10 11:36:53 EST 2019


https://github.com/python/cpython/commit/3e3d57d8490b729a80c8cd9e90475dec122dfe9e
commit: 3e3d57d8490b729a80c8cd9e90475dec122dfe9e
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-01-10T08:36:50-08:00
summary:

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

(cherry picked from commit 89c4f90df97f6039325e354167e8f507bf199fd9)

Co-authored-by: Zackery Spytz <zspytz at gmail.com>

files:
M Python/import.c

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)



More information about the Python-checkins mailing list