Issue #14125: Fix multiprocessing refleak on Windows. Patch by sbt.

This commit is contained in:
Stefan Krah 2012-02-27 13:51:02 +01:00
parent bd2c199b2b
commit a03422f5d3
1 changed files with 4 additions and 1 deletions

View File

@ -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 */