summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_posixsubprocess.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c
index ed2dd58..b8fb72f 100644
--- a/Modules/_posixsubprocess.c
+++ b/Modules/_posixsubprocess.c
@@ -579,6 +579,8 @@ subprocess_fork_exec(PyObject* self, PyObject *args)
/* Equivalent to: */
/* tuple(PyUnicode_FSConverter(arg) for arg in process_args) */
fast_args = PySequence_Fast(process_args, "argv must be a tuple");
+ if (fast_args == NULL)
+ goto cleanup;
num_args = PySequence_Fast_GET_SIZE(fast_args);
converted_args = PyTuple_New(num_args);
if (converted_args == NULL)