From owner-svn-src-head@freebsd.org Thu Sep 3 11:30:40 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 305799C9508; Thu, 3 Sep 2015 11:30:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 214EE1803; Thu, 3 Sep 2015 11:30:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t83BUdRg006751; Thu, 3 Sep 2015 11:30:39 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t83BUd2x006750; Thu, 3 Sep 2015 11:30:39 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201509031130.t83BUd2x006750@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 3 Sep 2015 11:30:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287426 - head/lib/libc/posix1e X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2015 11:30:40 -0000 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;