diff options
author | trasz <trasz@FreeBSD.org> | 2015-09-03 11:30:39 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2015-09-03 11:30:39 +0000 |
commit | 81554346534ca5247d6852cbbf3f3df38c08bfa8 (patch) | |
tree | 16f04f4b3ace5749d10874434453fec6e46ba1a9 /lib/libc/posix1e/acl_init.c | |
parent | c12d2cd4bc248359b06a581b8d6bebd21b97ac05 (diff) | |
download | FreeBSD-src-81554346534ca5247d6852cbbf3f3df38c08bfa8.zip FreeBSD-src-81554346534ca5247d6852cbbf3f3df38c08bfa8.tar.gz |
Fix the way acl_init(3) uses posix_memalign(3) - the latter doesn't
set errno.
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'lib/libc/posix1e/acl_init.c')
-rw-r--r-- | lib/libc/posix1e/acl_init.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/posix1e/acl_init.c b/lib/libc/posix1e/acl_init.c index 4fe4037..88a1fc5 100644 --- a/lib/libc/posix1e/acl_init.c +++ b/lib/libc/posix1e/acl_init.c @@ -67,8 +67,10 @@ acl_init(int count) error = posix_memalign((void *)&acl, 1 << _ACL_T_ALIGNMENT_BITS, sizeof(struct acl_t_struct)); - if (error) + if (error) { + errno = error; return (NULL); + } bzero(acl, sizeof(struct acl_t_struct)); acl->ats_brand = ACL_BRAND_UNKNOWN; |