From: Samuel Thibault Date: Tue, 14 Nov 2023 22:55:35 +0000 (+0100) Subject: hurd: Fix spawni returning allocation errors. X-Git-Tag: glibc-2.39~287 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=323f367cc46b80224d39b082adf7be74b49ed843;p=thirdparty%2Fglibc.git hurd: Fix spawni returning allocation errors. --- diff --git a/sysdeps/mach/hurd/spawni.c b/sysdeps/mach/hurd/spawni.c index 5e05308066e..95160018177 100644 --- a/sysdeps/mach/hurd/spawni.c +++ b/sysdeps/mach/hurd/spawni.c @@ -787,12 +787,18 @@ retry: /* Relative path */ char *cwd = __getcwd (NULL, 0); if (cwd == NULL) - goto out; + { + err = errno; + goto out; + } res = __asprintf (&concat_name, "%s/%s", cwd, relpath); free (cwd); if (res == -1) - goto out; + { + err = errno; + goto out; + } abspath = concat_name; }