]> granicus.if.org Git - python/commitdiff
Issue #19437: Fix select.epoll.poll(), fix code handling PyMem_New() error
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 30 Oct 2013 18:57:52 +0000 (19:57 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 30 Oct 2013 18:57:52 +0000 (19:57 +0100)
The bug was introduced with the select.epoll module! So it's 5 years old :-)

Modules/selectmodule.c

index 22106b1dbd37845061f8813d52bcfb8031e1fd0e..6291a2daa929eb116a8f7536e8c9b18f98d229df 100644 (file)
@@ -1459,7 +1459,6 @@ pyepoll_poll(pyEpoll_Object *self, PyObject *args, PyObject *kwds)
 
     evs = PyMem_New(struct epoll_event, maxevents);
     if (evs == NULL) {
-        Py_DECREF(self);
         PyErr_NoMemory();
         return NULL;
     }