svn commit: r287426 - head/lib/libc/posix1e

Edward Tomasz Napierala trasz at FreeBSD.org
Thu Sep 3 11:30:40 UTC 2015


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;


More information about the svn-src-all mailing list