Author: trasz
Date: Thu Sep  3 11:30:39 2015
New Revision: 287426
URL: https://svnweb.freebsd.org/changeset/base/287426

Log:
  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

Modified:
  head/lib/libc/posix1e/acl_init.c

Modified: head/lib/libc/posix1e/acl_init.c
==============================================================================
--- head/lib/libc/posix1e/acl_init.c    Thu Sep  3 07:18:52 2015        
(r287425)
+++ head/lib/libc/posix1e/acl_init.c    Thu Sep  3 11:30:39 2015        
(r287426)
@@ -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;
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to