]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
hurd: Fix spawni returning allocation errors.
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 14 Nov 2023 22:55:35 +0000 (23:55 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 14 Nov 2023 22:55:35 +0000 (23:55 +0100)
sysdeps/mach/hurd/spawni.c

index 5e05308066e82cbb21bb449dc2ce46fc67514cdf..9516001817785cd36cede1979df653ca077d4591 100644 (file)
@@ -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;
     }