Skip to content

Commit 53ca3b7

Browse files
[3.13] Fix os.posix_spawn() error handling (GH-142532) (#142581)
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 <bartosz@ilikepython.com>
1 parent 7c2d9c9 commit 53ca3b7

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
@@ -7352,7 +7352,7 @@ py_posix_spawn(int use_posix_spawnp, PyObject *module, path_t *path, PyObject *a
73527352
if (argc < 1) {
73537353
PyErr_Format(PyExc_ValueError,
73547354
"%s: argv must not be empty", func_name);
7355-
return NULL;
7355+
goto exit;
73567356
}
73577357

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

0 commit comments

Comments
 (0)