--- /dev/null
+Fix a crash, when there's no memory left on a device,
+which happened in :mod:`!_interpchannels` module.
+
+Now it raises proper :exc:`MemoryError` errors.
_channelends_new(void)
{
_channelends *ends = GLOBAL_MALLOC(_channelends);
- if (ends== NULL) {
+ if (ends == NULL) {
+ PyErr_NoMemory();
return NULL;
}
ends->numsendopen = 0;
{
_channel_state *chan = GLOBAL_MALLOC(_channel_state);
if (chan == NULL) {
+ PyErr_NoMemory();
return NULL;
}
chan->mutex = mutex;
{
_channelref *ref = GLOBAL_MALLOC(_channelref);
if (ref == NULL) {
+ PyErr_NoMemory();
return NULL;
}
ref->cid = cid;
}
chan->closing = GLOBAL_MALLOC(struct _channel_closing);
if (chan->closing == NULL) {
+ PyErr_NoMemory();
goto done;
}
chan->closing->ref = ref;