]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-1635741: Fix NULL ptr deref in multiprocessing (GH-22880)
authorChristian Heimes <christian@python.org>
Thu, 22 Oct 2020 10:20:36 +0000 (12:20 +0200)
committerGitHub <noreply@github.com>
Thu, 22 Oct 2020 10:20:36 +0000 (03:20 -0700)
Commit 1d541c25c8019f7a0b80b3e1b437abe171e40b65 introduced a NULL
pointer dereference in error path.

Signed-off-by: Christian Heimes <christian@python.org>
Modules/_multiprocessing/multiprocessing.c

index 25b8dc3967a4fb693cf9df6b5f274ef70826a8b3..bec23517fca517d2943c6287aac3bb18abbda549 100644 (file)
@@ -207,7 +207,6 @@ multiprocessing_exec(PyObject *module)
             py_sem_value_max = PyLong_FromLong(SEM_VALUE_MAX);
 
         if (py_sem_value_max == NULL) {
-            Py_DECREF(py_sem_value_max);
             return -1;
         }
         if (PyDict_SetItemString(_PyMp_SemLockType.tp_dict, "SEM_VALUE_MAX",