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
1 changed files with 0 additions and 1 deletions

View File

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