Extension Modules
-----------------
+- Issue #6544: fix a reference leak in the kqueue implementation's error
+ handling.
+
- Stop providing crtassem.h symbols when compiling with Visual Studio 2010, as
msvcr100.dll is not a platform assembly anymore.
#undef KQ_OFF
static PyObject *
+
kqueue_event_repr(kqueue_event_Object *s)
{
char buf[1024];
return NULL;
}
- if (ch != NULL && ch != Py_None) {
- it = PyObject_GetIter(ch);
- if (it == NULL) {
- PyErr_SetString(PyExc_TypeError,
- "changelist is not iterable");
- return NULL;
- }
- nchanges = PyObject_Size(ch);
- if (nchanges < 0) {
- return NULL;
- }
- }
-
if (otimeout == Py_None || otimeout == NULL) {
ptimeoutspec = NULL;
}
return NULL;
}
- if (nchanges) {
+ if (ch != NULL && ch != Py_None) {
+ it = PyObject_GetIter(ch);
+ if (it == NULL) {
+ PyErr_SetString(PyExc_TypeError,
+ "changelist is not iterable");
+ return NULL;
+ }
+ nchanges = PyObject_Size(ch);
+ if (nchanges < 0) {
+ goto error;
+ }
+
chl = PyMem_New(struct kevent, nchanges);
if (chl == NULL) {
PyErr_NoMemory();
- return NULL;
+ goto error;
}
i = 0;
while ((ei = PyIter_Next(it)) != NULL) {
evl = PyMem_New(struct kevent, nevents);
if (evl == NULL) {
PyErr_NoMemory();
- return NULL;
+ goto error;
}
}