[Backport to 2-5maint of r52147 | andrew.kuchling ; the buildbots seem OK
 with this change.]

Cause a PyObject_Malloc() failure to trigger a MemoryError, and then
add 'if (PyErr_Occurred())' checks to various places so that NULL is
returned properly.
2 files changed