From be8b0685a55700c6bce3681734800ec6434b0364 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 30 Apr 2007 02:39:34 +0000 Subject: r22589: Make TALLOC_ARRAY consistent across all uses. Jeremy. (This used to be commit 8968808c3b5b0208cbad9ac92eaf948f2c546dd9) --- source3/modules/vfs_afsacl.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source3/modules') diff --git a/source3/modules/vfs_afsacl.c b/source3/modules/vfs_afsacl.c index 43fa537d73..a82e6b350b 100644 --- a/source3/modules/vfs_afsacl.c +++ b/source3/modules/vfs_afsacl.c @@ -616,10 +616,14 @@ static size_t afs_to_nt_acl(struct afs_acl *afs_acl, uid_to_sid(&owner_sid, sbuf.st_uid); gid_to_sid(&group_sid, sbuf.st_gid); - nt_ace_list = TALLOC_ARRAY(mem_ctx, SEC_ACE, afs_acl->num_aces); + if (num_aces) { + nt_ace_list = TALLOC_ARRAY(mem_ctx, SEC_ACE, afs_acl->num_aces); - if (nt_ace_list == NULL) - return 0; + if (nt_ace_list == NULL) + return 0; + } else { + nt_ace_list = NULL; + } afs_ace = afs_acl->acelist; good_aces = 0; -- cgit