summaryrefslogtreecommitdiff
path: root/source/modules
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-04-30 03:41:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:49 -0500
commit8044a6482c7c165a64878982cee5ee9756a0a734 (patch)
treecb394eab00b3c533b73680df80217d5ea103bf47 /source/modules
parentaa5a1591c626e2828244a78f237af8a59af57784 (diff)
downloadsamba-8044a6482c7c165a64878982cee5ee9756a0a734.tar.gz
r22592: Fix TALLOC_SIZE to be consistent.
Jeremy.
Diffstat (limited to 'source/modules')
-rw-r--r--source/modules/nfs4_acls.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/source/modules/nfs4_acls.c b/source/modules/nfs4_acls.c
index b6bcc8cd47f..8530a5db032 100644
--- a/source/modules/nfs4_acls.c
+++ b/source/modules/nfs4_acls.c
@@ -206,14 +206,18 @@ static BOOL smbacl4_nfs42win(SMB4ACL_T *acl, /* in */
if (aclint==NULL)
return False;
- nt_ace_list = (SEC_ACE *)TALLOC_SIZE(mem_ctx, aclint->naces * sizeof(SEC_ACE));
- if (nt_ace_list==NULL)
- {
- DEBUG(10, ("talloc error"));
- errno = ENOMEM;
- return False;
+ if (aclint->naces) {
+ nt_ace_list = (SEC_ACE *)TALLOC_SIZE(mem_ctx, aclint->naces * sizeof(SEC_ACE));
+ if (nt_ace_list==NULL)
+ {
+ DEBUG(10, ("talloc error"));
+ errno = ENOMEM;
+ return False;
+ }
+ memset(nt_ace_list, 0, aclint->naces * sizeof(SEC_ACE));
+ } else {
+ nt_ace_list = NULL;
}
- memset(nt_ace_list, 0, aclint->naces * sizeof(SEC_ACE));
for (aceint=aclint->first; aceint!=NULL; aceint=(SMB_ACE4_INT_T *)aceint->next) {
SEC_ACCESS mask;