]> granicus.if.org Git - python/commitdiff
SF bug 684667: Modules/selectmodule.c returns NULL without exception set.
authorTim Peters <tim.peters@gmail.com>
Tue, 11 Feb 2003 17:18:58 +0000 (17:18 +0000)
committerTim Peters <tim.peters@gmail.com>
Tue, 11 Feb 2003 17:18:58 +0000 (17:18 +0000)
select_select() didn't set an exception in the SELECT_USES_HEAP case when
malloc() returned NULL.

Modules/selectmodule.c

index 0ff0b2cc16a4b0801a7672808c008a2593013d65..98b75f0672bfabc18312b6325978edaa326fe78c 100644 (file)
@@ -248,7 +248,7 @@ select_select(PyObject *self, PyObject *args)
                if (rfd2obj) PyMem_DEL(rfd2obj);
                if (wfd2obj) PyMem_DEL(wfd2obj);
                if (efd2obj) PyMem_DEL(efd2obj);
-               return NULL;
+               return PyErr_NoMemory();
        }
 #endif /* SELECT_USES_HEAP */
        /* Convert lists to fd_sets, and get maximum fd number