From 323f367cc46b80224d39b082adf7be74b49ed843 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 14 Nov 2023 23:55:35 +0100 Subject: hurd: Fix spawni returning allocation errors. --- sysdeps/mach/hurd/spawni.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sysdeps/mach') diff --git a/sysdeps/mach/hurd/spawni.c b/sysdeps/mach/hurd/spawni.c index 5e05308..9516001 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; } -- cgit v1.1