diff options
-rw-r--r-- | Misc/NEWS | 2 | ||||
-rw-r--r-- | Modules/_posixsubprocess.c | 4 |
2 files changed, 5 insertions, 1 deletions
@@ -109,6 +109,8 @@ Core and Builtins Library ------- +- Issue #15777: Fix a refleak in _posixsubprocess. + - Issue #15199: Fix JavaScript's default MIME type to application/javascript. Patch by Bohuslav Kabrda. 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 |