bpo-35414: Add a missing Py_INCREF(Py_None) in PyState_RemoveModule(). (GH-10914)

(cherry picked from commit 2a893430c9)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
This commit is contained in:
Miss Islington (bot) 2018-12-04 23:51:08 -08:00 committed by GitHub
parent c93e3b05d5
commit 2d594f8578
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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);
}