hurd: Fix spawni returning allocation errors.

This commit is contained in:
Samuel Thibault 2023-11-14 23:55:35 +01:00
parent 8f22e36238
commit 323f367cc4

View file

@ -787,12 +787,18 @@ retry:
/* Relative path */ /* Relative path */
char *cwd = __getcwd (NULL, 0); char *cwd = __getcwd (NULL, 0);
if (cwd == NULL) if (cwd == NULL)
goto out; {
err = errno;
goto out;
}
res = __asprintf (&concat_name, "%s/%s", cwd, relpath); res = __asprintf (&concat_name, "%s/%s", cwd, relpath);
free (cwd); free (cwd);
if (res == -1) if (res == -1)
goto out; {
err = errno;
goto out;
}
abspath = concat_name; abspath = concat_name;
} }