Date: Thu, 3 Sep 2015 11:31:34 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287427 - head/lib/libc/posix1e Message-ID: <201509031131.t83BVYEg009405@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Thu Sep 3 11:31:34 2015 New Revision: 287427 URL: https://svnweb.freebsd.org/changeset/base/287427 Log: Fix acl_strip_np(3) breakage introduced in r279962. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/lib/libc/posix1e/acl_strip.c Modified: head/lib/libc/posix1e/acl_strip.c ============================================================================== --- head/lib/libc/posix1e/acl_strip.c Thu Sep 3 11:30:39 2015 (r287426) +++ head/lib/libc/posix1e/acl_strip.c Thu Sep 3 11:31:34 2015 (r287427) @@ -107,13 +107,13 @@ _posix1e_acl_strip_np(const acl_t aclp, if (acl_get_permset(entry, &perm) == -1) goto fail; if (acl_create_entry(&acl_new, &entry_new) == -1) - return (NULL); + goto fail; if (acl_set_tag_type(entry_new, tag) == -1) - return (NULL); + goto fail; if (acl_set_permset(entry_new, perm) == -1) - return (NULL); + goto fail; if (acl_copy_entry(entry_new, entry) == -1) - return (NULL); + goto fail; assert(_entry_brand(entry_new) == ACL_BRAND_POSIX); break; case ACL_MASK: @@ -122,20 +122,22 @@ _posix1e_acl_strip_np(const acl_t aclp, default: break; } -fail: - acl_free(acl_new); - acl_free(acl_old); - return (NULL); } assert(_acl_brand(acl_new) == ACL_BRAND_POSIX); if (have_mask_entry && recalculate_mask) { if (acl_calc_mask(&acl_new) == -1) - return (NULL); + goto fail; } return (acl_new); + +fail: + acl_free(acl_new); + acl_free(acl_old); + + return (NULL); } acl_t
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509031131.t83BVYEg009405>