From bbf8ce5b87f355796ec9fea1cf0adba9de5e5ce1 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 9 Jul 2013 00:49:03 +0200 Subject: [PATCH] Issue #18408: Fix select.select() to handle PyList_New() failure (MemoryError) in set2list() --- Modules/selectmodule.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c index ac4498569ed..252dee23606 100644 --- a/Modules/selectmodule.c +++ b/Modules/selectmodule.c @@ -299,9 +299,9 @@ select_select(PyObject *self, PyObject *args) else ret = PyTuple_Pack(3, ifdlist, ofdlist, efdlist); - Py_DECREF(ifdlist); - Py_DECREF(ofdlist); - Py_DECREF(efdlist); + Py_XDECREF(ifdlist); + Py_XDECREF(ofdlist); + Py_XDECREF(efdlist); } finally: