summaryrefslogtreecommitdiffstats
path: root/Modules/_multiprocessing/multiprocessing.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_multiprocessing/multiprocessing.c')
-rw-r--r--Modules/_multiprocessing/multiprocessing.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/_multiprocessing/multiprocessing.c b/Modules/_multiprocessing/multiprocessing.c
index 8f9daa5..16b5cb5 100644
--- a/Modules/_multiprocessing/multiprocessing.c
+++ b/Modules/_multiprocessing/multiprocessing.c
@@ -266,8 +266,7 @@ multiprocessing_exec(PyObject *module)
ADD_FLAG(HAVE_BROKEN_SEM_UNLINK);
#endif
- if (PyModule_AddObject(module, "flags", flags) < 0) {
- Py_DECREF(flags);
+ if (PyModule_Add(module, "flags", flags) < 0) {
return -1;
}