gh-152156: Fix a crash in `interpeters.create` under limited memory conditions (GH-152163)
(cherry picked from commit
3ad66bf10dbb929bcf8efd889e56a9b9068319ca)
Co-authored-by: sobolevn <mail@sobolevn.me>
--- /dev/null
+Fix a possible crash in :func:`concurrent.interpreters.create` under limited
+memory conditions.
&cidobj);
if (handle_channel_error(err, self, cid)) {
assert(cidobj == NULL);
- err = channel_destroy(&_globals.channels, cid);
- if (handle_channel_error(err, self, cid)) {
- // XXX issue a warning?
- }
+ assert(PyErr_Occurred());
+ (void)channel_destroy(&_globals.channels, cid);
return NULL;
}
assert(cidobj != NULL);