Make sure to call PyErr_NoMemory() in several places where
PyMem_Malloc() could potentially fail.

Will backport to the release25-maint branch.
3 files changed