Commit 72418d69 authored by Stefan Krah's avatar Stefan Krah

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

parent a1f4bae1
...@@ -708,9 +708,12 @@ win32_WaitForMultipleObjects(PyObject* self, PyObject* args) ...@@ -708,9 +708,12 @@ win32_WaitForMultipleObjects(PyObject* self, PyObject* args)
PyObject *v = PySequence_GetItem(handle_seq, i); PyObject *v = PySequence_GetItem(handle_seq, i);
if (v == NULL) if (v == NULL)
return NULL; return NULL;
if (!PyArg_Parse(v, F_HANDLE, &h)) if (!PyArg_Parse(v, F_HANDLE, &h)) {
Py_DECREF(v);
return NULL; return NULL;
}
handles[i] = h; handles[i] = h;
Py_DECREF(v);
} }
/* If this is the main thread then make the wait interruptible /* If this is the main thread then make the wait interruptible
by Ctrl-C unless we are waiting for *all* handles */ by Ctrl-C unless we are waiting for *all* handles */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment