summaryrefslogtreecommitdiffstats
path: root/Modules/selectmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/selectmodule.c')
-rw-r--r--Modules/selectmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index 9a4943c..a88c3cb 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -1292,8 +1292,8 @@ newPyEpoll_Object(PyTypeObject *type, int sizehint, SOCKET fd)
self->epfd = fd;
}
if (self->epfd < 0) {
- Py_DECREF(self);
PyErr_SetFromErrno(PyExc_OSError);
+ Py_DECREF(self);
return NULL;
}
@@ -1971,8 +1971,8 @@ newKqueue_Object(PyTypeObject *type, SOCKET fd)
self->kqfd = fd;
}
if (self->kqfd < 0) {
- Py_DECREF(self);
PyErr_SetFromErrno(PyExc_OSError);
+ Py_DECREF(self);
return NULL;
}