[PATCH 5/6] s3:modules:nfs4_acls fix memory hierarchy in smb_create_smb4acl
Christian Ambach
ambi at samba.org
Fri Nov 16 15:50:35 MST 2012
the ACEs should be talloc children of the ACL itself and not be placed on talloc_tos()
Signed-off-by: Christian Ambach <ambi at samba.org>
---
source3/modules/nfs4_acls.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c
index 48b045f..1b691c3 100644
--- a/source3/modules/nfs4_acls.c
+++ b/source3/modules/nfs4_acls.c
@@ -161,11 +161,10 @@ SMB4ACL_T *smb_create_smb4acl(void)
SMB4ACE_T *smb_add_ace4(SMB4ACL_T *theacl, SMB_ACE4PROP_T *prop)
{
SMB_ACL4_INT_T *aclint = get_validated_aclint(theacl);
- TALLOC_CTX *mem_ctx = talloc_tos();
SMB_ACE4_INT_T *ace;
ace = (SMB_ACE4_INT_T *)TALLOC_ZERO_SIZE(
- mem_ctx, sizeof(SMB_ACE4_INT_T));
+ theacl, sizeof(SMB_ACE4_INT_T));
if (ace==NULL)
{
DEBUG(0, ("TALLOC_SIZE failed\n"));
--
1.7.11.7
More information about the samba-technical
mailing list