diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-11-14 23:55:35 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-11-14 23:55:35 +0100 |
commit | 323f367cc46b80224d39b082adf7be74b49ed843 (patch) | |
tree | 236fd73f1554bb49093b99c5a9febf7a55788d69 /sysdeps/mach/hurd/spawni.c | |
parent | 8f22e36238c94e2a89da624e03c224895f9dd691 (diff) | |
download | glibc-323f367cc46b80224d39b082adf7be74b49ed843.tar.gz glibc-323f367cc46b80224d39b082adf7be74b49ed843.tar.xz glibc-323f367cc46b80224d39b082adf7be74b49ed843.zip |
hurd: Fix spawni returning allocation errors.
Diffstat (limited to 'sysdeps/mach/hurd/spawni.c')
-rw-r--r-- | sysdeps/mach/hurd/spawni.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sysdeps/mach/hurd/spawni.c b/sysdeps/mach/hurd/spawni.c index 5e05308066..9516001817 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; } |