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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user