svn commit: r287427 - head/lib/libc/posix1e
Edward Tomasz Napierala
trasz at FreeBSD.org
Thu Sep 3 11:31:35 UTC 2015
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
More information about the svn-src-all
mailing list