From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Thu, 11 Dec 2025 17:32:11 +0000 (+0100) Subject: [3.14] Fix os.posix_spawn() error handling (GH-142532) (#142582) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc40e7dc52c0b578d873f7fff7c0f709bf5c5aab;p=thirdparty%2FPython%2Fcpython.git [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 8cfa351560487d472df4c7d841814801fbf57397) Co-authored-by: Bartosz Sławecki --- diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 6e878e3de372..e11f16d0940f 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -7447,7 +7447,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) {