diff options
Diffstat (limited to 'Modules/_multiprocessing')
-rw-r--r-- | Modules/_multiprocessing/win32_functions.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/_multiprocessing/win32_functions.c b/Modules/_multiprocessing/win32_functions.c index e175997..15aeeda 100644 --- a/Modules/_multiprocessing/win32_functions.c +++ b/Modules/_multiprocessing/win32_functions.c @@ -708,9 +708,12 @@ win32_WaitForMultipleObjects(PyObject* self, PyObject* args) PyObject *v = PySequence_GetItem(handle_seq, i); if (v == NULL) return NULL; - if (!PyArg_Parse(v, F_HANDLE, &h)) + if (!PyArg_Parse(v, F_HANDLE, &h)) { + Py_DECREF(v); return NULL; + } handles[i] = h; + Py_DECREF(v); } /* If this is the main thread then make the wait interruptible by Ctrl-C unless we are waiting for *all* handles */ |