summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 5f17fce..197607c 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -6413,6 +6413,9 @@ os_sched_setaffinity_impl(PyObject *module, pid_t pid, PyObject *mask)
}
CPU_SET_S(cpu, setsize, cpu_set);
}
+ if (PyErr_Occurred()) {
+ goto error;
+ }
Py_CLEAR(iterator);
if (sched_setaffinity(pid, setsize, cpu_set)) {