Skip to content

Commit 8cfa351

Browse files
authored
Fix os.posix_spawn() error handling (#142532)
Consistently use `goto exit;` in `py_posix_spawn()`.
1 parent a275385 commit 8cfa351

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/posixmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7903,7 +7903,7 @@ py_posix_spawn(int use_posix_spawnp, PyObject *module, path_t *path, PyObject *a
79037903
if (argc < 1) {
79047904
PyErr_Format(PyExc_ValueError,
79057905
"%s: argv must not be empty", func_name);
7906-
return NULL;
7906+
goto exit;
79077907
}
79087908

79097909
if (!PyMapping_Check(env) && env != Py_None) {

0 commit comments

Comments
 (0)