diff options
author | Zackery Spytz <zspytz@gmail.com> | 2018-12-05 07:14:00 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2018-12-05 07:14:00 (GMT) |
commit | 2a893430c9c8378cbdfac95895a64fa07aaff9ed (patch) | |
tree | f23736aa59bae235f42abcea73bf0a37c235b192 | |
parent | c11b3b19a5b022c6c229043d37f9a9fd06f22500 (diff) | |
download | cpython-2a893430c9c8378cbdfac95895a64fa07aaff9ed.zip cpython-2a893430c9c8378cbdfac95895a64fa07aaff9ed.tar.gz cpython-2a893430c9c8378cbdfac95895a64fa07aaff9ed.tar.bz2 |
bpo-35414: Add a missing Py_INCREF(Py_None) in PyState_RemoveModule(). (GH-10914)
-rw-r--r-- | Python/pystate.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index f86f5a9..98882eb 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); } |