From: Zackery Spytz Date: Wed, 5 Dec 2018 07:14:00 +0000 (-0700) Subject: bpo-35414: Add a missing Py_INCREF(Py_None) in PyState_RemoveModule(). (GH-10914) X-Git-Tag: v3.8.0a1~354 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2a893430c9c8378cbdfac95895a64fa07aaff9ed;p=thirdparty%2FPython%2Fcpython.git bpo-35414: Add a missing Py_INCREF(Py_None) in PyState_RemoveModule(). (GH-10914) --- 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); }