diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-12-04 23:51:15 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-04 23:51:15 -0800 |
| commit | afb07fccf013f20b89b33516f126695388be47b9 (patch) | |
| tree | 151df49128e405dce363b65ca6941d489a116e28 /Python | |
| parent | 93d038c91dc3075dd34b41ce6b6fb4ea07fbb8c3 (diff) | |
| download | cpython-git-afb07fccf013f20b89b33516f126695388be47b9.tar.gz | |
bpo-35414: Add a missing Py_INCREF(Py_None) in PyState_RemoveModule(). (GH-10914)
(cherry picked from commit 2a893430c9c8378cbdfac95895a64fa07aaff9ed)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Diffstat (limited to 'Python')
| -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 c0e088055a..71494daa47 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -377,6 +377,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); } |
