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

Serhiy Storchaka webhook-mailer at python.org
Thu Jan 10 11:12:36 EST 2019


https://github.com/python/cpython/commit/89c4f90df97f6039325e354167e8f507bf199fd9
commit: 89c4f90df97f6039325e354167e8f507bf199fd9
branch: master
author: Zackery Spytz <zspytz at gmail.com>
committer: Serhiy Storchaka <storchaka at gmail.com>
date: 2019-01-10T18:12:31+02:00
summary:

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

files:
M Python/import.c

diff --git a/Python/import.c b/Python/import.c
index c4f087761cd6..344f199216d0 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)



More information about the Python-checkins mailing list