aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2020-10-22 12:20:36 +0200
committerGitHub <noreply@github.com>2020-10-22 03:20:36 -0700
commitdde91b1953c0f0d51c4dde056727ff84b7655190 (patch)
tree7a57e7b5a9cb3092bba8d6b0e9d0dd5f288979dd /Modules/_multiprocessing
parent_testmultiphase: Fix possible ref leak (GH-22881) (diff)
downloadcpython-dde91b1953c0f0d51c4dde056727ff84b7655190.tar.gz
cpython-dde91b1953c0f0d51c4dde056727ff84b7655190.tar.bz2
cpython-dde91b1953c0f0d51c4dde056727ff84b7655190.zip
bpo-1635741: Fix NULL ptr deref in multiprocessing (GH-22880)
Commit 1d541c25c8019f7a0b80b3e1b437abe171e40b65 introduced a NULL pointer dereference in error path. Signed-off-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Modules/_multiprocessing')
-rw-r--r--Modules/_multiprocessing/multiprocessing.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/Modules/_multiprocessing/multiprocessing.c b/Modules/_multiprocessing/multiprocessing.c
index 25b8dc3967a..bec23517fca 100644
--- a/Modules/_multiprocessing/multiprocessing.c
+++ b/Modules/_multiprocessing/multiprocessing.c
@@ -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",