mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +00:00
Issue #14125: Fix multiprocessing refleak on Windows. Patch by sbt.
This commit is contained in:
parent
bd2c199b2b
commit
a03422f5d3
1 changed files with 4 additions and 1 deletions
|
@ -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 */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue