libc: correct posix_spawn_file_actions_init ENOMEM error

The return value of posix_spawn_file_actions_init() is an error number.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D56911
This commit is contained in:
Jilles Tjoelker
2026-05-10 00:01:50 +02:00
parent fdd7daa231
commit 3ca8ec19b6
+1 -1
View File
@@ -424,7 +424,7 @@ posix_spawn_file_actions_init(posix_spawn_file_actions_t *ret)
fa = malloc(sizeof(struct __posix_spawn_file_actions));
if (fa == NULL)
return (-1);
return (errno);
STAILQ_INIT(&fa->fa_list);
*ret = fa;