summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2012-02-27 12:51:02 (GMT)
committerStefan Krah <skrah@bytereef.org>2012-02-27 12:51:02 (GMT)
commita03422f5d3a0780bfde5e4aa7ee05e1eb9a090fd (patch)
tree32dd2d0a0504346d756fe4f8c3ca3d8cca10548d /Modules
parentbd2c199b2b3b0a60a1feb9e16063ca3d83322137 (diff)
downloadcpython-a03422f5d3a0780bfde5e4aa7ee05e1eb9a090fd.zip
cpython-a03422f5d3a0780bfde5e4aa7ee05e1eb9a090fd.tar.gz
cpython-a03422f5d3a0780bfde5e4aa7ee05e1eb9a090fd.tar.bz2
Issue #14125: Fix multiprocessing refleak on Windows. Patch by sbt.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_multiprocessing/win32_functions.c5
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 */