bpo-1635741: Fix NULL ptr deref in multiprocessing (GH-22880)

Commit 1d541c25c8 introduced a NULL
pointer dereference in error path.

Signed-off-by: Christian Heimes <christian@python.org>
This commit is contained in:
Christian Heimes 2020-10-22 12:20:36 +02:00 committed by GitHub
parent 8a9463f2d4
commit dde91b1953
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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",