Skip to content

Commit fc40e7d

Browse files
[3.14] Fix os.posix_spawn() error handling (GH-142532) (#142582)
Fix os.posix_spawn() error handling (GH-142532) Consistently use `goto exit;` in `py_posix_spawn()`. (cherry picked from commit 8cfa351) Co-authored-by: Bartosz Sławecki <[email protected]>
1 parent 7218be0 commit fc40e7d

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
@@ -7447,7 +7447,7 @@ py_posix_spawn(int use_posix_spawnp, PyObject *module, path_t *path, PyObject *a
74477447
if (argc < 1) {
74487448
PyErr_Format(PyExc_ValueError,
74497449
"%s: argv must not be empty", func_name);
7450-
return NULL;
7450+
goto exit;
74517451
}
74527452

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

0 commit comments

Comments
 (0)