[Python-checkins] bpo-35414: Add a missing Py_INCREF(Py_None) in PyState_RemoveModule(). (GH-10914)
Serhiy Storchaka
webhook-mailer at python.org
Wed Dec 5 02:14:06 EST 2018
https://github.com/python/cpython/commit/2a893430c9c8378cbdfac95895a64fa07aaff9ed
commit: 2a893430c9c8378cbdfac95895a64fa07aaff9ed
branch: master
author: Zackery Spytz <zspytz at gmail.com>
committer: Serhiy Storchaka <storchaka at gmail.com>
date: 2018-12-05T09:14:00+02:00
summary:
bpo-35414: Add a missing Py_INCREF(Py_None) in PyState_RemoveModule(). (GH-10914)
files:
M Python/pystate.c
diff --git a/Python/pystate.c b/Python/pystate.c
index f86f5a96f074..98882eb7589c 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -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);
}
More information about the Python-checkins
mailing list