Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a7f4f5a commit ad95653Copy full SHA for ad95653
1 file changed
Python/import.c
@@ -612,7 +612,6 @@ _PyImport_FindExtension(char *name, char *filename)
612
mod = PyImport_AddModule(name);
613
if (mod == NULL)
614
return NULL;
615
- Py_INCREF(mod);
616
mdict = PyModule_GetDict(mod);
617
if (mdict == NULL)
618
@@ -626,6 +625,7 @@ _PyImport_FindExtension(char *name, char *filename)
626
625
627
628
PyDict_SetItemString(PyImport_GetModuleDict(), name, mod);
+ Py_DECREF(mod);
629
}
630
if (_PyState_AddModule(mod, def) < 0) {
631
PyDict_DelItemString(PyImport_GetModuleDict(), name);
0 commit comments