diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-12-04 23:51:08 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-04 23:51:08 -0800 |
commit | 2d594f857865a4719876ac545ddfd62f474522cd (patch) | |
tree | a0c936e31334c026ed619106bc2b1a4ed1734a53 /Python | |
parent | c93e3b05d5672dc9e8d6e2f2dce332799d5b95d2 (diff) | |
download | cpython-git-2d594f857865a4719876ac545ddfd62f474522cd.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 15761e7da9..8077a3ee7a 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -532,6 +532,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); } |