The fix applies to the _interpchannels module as well.
I've also included a drive-by typo fix for _interpqueues.
static int
module_exec(PyObject *mod)
{
- if (_globals_init() != 0) {
+ int err = _globals_init();
+ if (handle_channel_error(err, mod, -1)) {
return -1;
}
struct _queueid_xid *data = PyMem_RawMalloc(sizeof(struct _queueid_xid));
if (data == NULL) {
- _queues_incref(queues, qid);
+ _queues_decref(queues, qid);
return NULL;
}
data->qid = qid;
static int
module_exec(PyObject *mod)
{
- if (_globals_init() != 0) {
+ int err = _globals_init();
+ if (handle_queue_error(err, mod, -1)) {
return -1;
}