bpo-35414: Add a missing Py_INCREF(Py_None) in PyState_RemoveModule(). (GH-10914)

This commit is contained in:
Zackery Spytz 2018-12-05 00:14:00 -07:00 committed by Serhiy Storchaka
parent c11b3b19a5
commit 2a893430c9
1 changed files with 1 additions and 0 deletions

View File

@ -592,6 +592,7 @@ PyState_RemoveModule(struct PyModuleDef* def)
Py_FatalError("PyState_RemoveModule: Module index out of bounds.");
return -1;
}
Py_INCREF(Py_None);
return PyList_SetItem(state->modules_by_index, index, Py_None);
}