Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2a89343

Browse files
ZackerySpytzserhiy-storchaka
authored andcommitted
bpo-35414: Add a missing Py_INCREF(Py_None) in PyState_RemoveModule(). (GH-10914)
1 parent c11b3b1 commit 2a89343

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Python/pystate.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,7 @@ PyState_RemoveModule(struct PyModuleDef* def)
592592
Py_FatalError("PyState_RemoveModule: Module index out of bounds.");
593593
return -1;
594594
}
595+
Py_INCREF(Py_None);
595596
return PyList_SetItem(state->modules_by_index, index, Py_None);
596597
}
597598

0 commit comments

Comments
 (0)