# HG changeset patch # Parent 20327d6b11334ce3d8d186377db631ef415b3940 diff -r 20327d6b1133 -r c5a8d8b0782a Modules/_multiprocessing/win32_functions.c --- a/Modules/_multiprocessing/win32_functions.c Sat Feb 25 16:42:27 2012 +0000 +++ b/Modules/_multiprocessing/win32_functions.c Sun Feb 26 23:12:20 2012 +0000 @@ -708,9 +708,12 @@ 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 */