[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 8cfa351560)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
This commit is contained in:
Miss Islington (bot) 2025-12-17 16:43:51 +01:00 committed by GitHub
parent 7c2d9c9498
commit 53ca3b7b5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7352,7 +7352,7 @@ py_posix_spawn(int use_posix_spawnp, PyObject *module, path_t *path, PyObject *a
if (argc < 1) {
PyErr_Format(PyExc_ValueError,
"%s: argv must not be empty", func_name);
return NULL;
goto exit;
}
if (!PyMapping_Check(env) && env != Py_None) {