summaryrefslogtreecommitdiffstats
path: root/Modules/_posixsubprocess.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_posixsubprocess.c')
-rw-r--r--Modules/_posixsubprocess.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c
index c93f537..59673f4 100644
--- a/Modules/_posixsubprocess.c
+++ b/Modules/_posixsubprocess.c
@@ -566,8 +566,10 @@ subprocess_fork_exec(PyObject* self, PyObject *args)
}
exec_array = _PySequence_BytesToCharpArray(executable_list);
- if (!exec_array)
+ if (!exec_array) {
+ Py_XDECREF(gc_module);
return NULL;
+ }
/* Convert args and env into appropriate arguments for exec() */
/* These conversions are done in the parent process to avoid allocating