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:
parent
8a9463f2d4
commit
dde91b1953
|
@ -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",
|
||||||
|
|
Loading…
Reference in New Issue