Skip to content

Commit

Permalink
bpo-35414: Add a missing Py_INCREF(Py_None) in PyState_RemoveModule(). (
Browse files Browse the repository at this point in the history
GH-10914)

(cherry picked from commit 2a89343)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
  • Loading branch information
miss-islington and ZackerySpytz committed Dec 5, 2018
1 parent 93d038c commit afb07fc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Python/pystate.c
Expand Up @@ -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);
}

Expand Down

0 comments on commit afb07fc

Please sign in to comment.