svn commit: samba r22592 - in branches: SAMBA_3_0/source/modules
SAMBA_3_0_25/source/modules
jra at samba.org
jra at samba.org
Mon Apr 30 03:41:40 GMT 2007
Author: jra
Date: 2007-04-30 03:41:40 +0000 (Mon, 30 Apr 2007)
New Revision: 22592
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22592
Log:
Fix TALLOC_SIZE to be consistent.
Jeremy.
Modified:
branches/SAMBA_3_0/source/modules/nfs4_acls.c
branches/SAMBA_3_0_25/source/modules/nfs4_acls.c
Changeset:
Modified: branches/SAMBA_3_0/source/modules/nfs4_acls.c
===================================================================
--- branches/SAMBA_3_0/source/modules/nfs4_acls.c 2007-04-30 03:38:19 UTC (rev 22591)
+++ branches/SAMBA_3_0/source/modules/nfs4_acls.c 2007-04-30 03:41:40 UTC (rev 22592)
@@ -206,14 +206,18 @@
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;
Modified: branches/SAMBA_3_0_25/source/modules/nfs4_acls.c
===================================================================
--- branches/SAMBA_3_0_25/source/modules/nfs4_acls.c 2007-04-30 03:38:19 UTC (rev 22591)
+++ branches/SAMBA_3_0_25/source/modules/nfs4_acls.c 2007-04-30 03:41:40 UTC (rev 22592)
@@ -206,14 +206,18 @@
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;
More information about the samba-cvs
mailing list