From: Bartosz Sławecki Date: Thu, 11 Dec 2025 17:02:26 +0000 (+0100) Subject: Fix os.posix_spawn() error handling (#142532) X-Git-Tag: v3.15.0a3~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cfa351560487d472df4c7d841814801fbf57397;p=thirdparty%2FPython%2Fcpython.git Fix os.posix_spawn() error handling (#142532) Consistently use `goto exit;` in `py_posix_spawn()`. --- diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index fc609b2707c6..221cfc5a9341 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -7903,7 +7903,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) {