Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 09 May 2026 22:03:38 +0000
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 3ca8ec19b6ec - main - libc: correct posix_spawn_file_actions_init ENOMEM error
Message-ID:  <69ffaf3a.34539.6a178982@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by jilles:

URL: https://cgit.FreeBSD.org/src/commit/?id=3ca8ec19b6ecc8ae4413d0505ce2d0efdd3e52c8

commit 3ca8ec19b6ecc8ae4413d0505ce2d0efdd3e52c8
Author:     Jilles Tjoelker <jilles@FreeBSD.org>
AuthorDate: 2026-05-09 22:01:50 +0000
Commit:     Jilles Tjoelker <jilles@FreeBSD.org>
CommitDate: 2026-05-09 22:02:25 +0000

    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
---
 lib/libc/gen/posix_spawn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libc/gen/posix_spawn.c b/lib/libc/gen/posix_spawn.c
index 11cdb5a29d03..faddb0d1494f 100644
--- a/lib/libc/gen/posix_spawn.c
+++ b/lib/libc/gen/posix_spawn.c
@@ -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;


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69ffaf3a.34539.6a178982>