summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorChristian Ambach <ambi@samba.org>2012-11-05 18:47:01 +0100
committerAndrew Bartlett <abartlet@samba.org>2012-11-16 23:28:21 +0100
commitc9d70740e39722a2f98ccd932b053723a4f3de62 (patch)
treef9fe597c6ec9c101d2f43f216fe6bce0cbb2a5a2 /source3/modules
parent775d0a78c496af8ddbde9eb0f8c2f6d5dc5bcc81 (diff)
downloadsamba-c9d70740e39722a2f98ccd932b053723a4f3de62.tar.gz
samba-c9d70740e39722a2f98ccd932b053723a4f3de62.tar.bz2
samba-c9d70740e39722a2f98ccd932b053723a4f3de62.zip
s3:modules:nfs4_acls fix memory hierarchy in smb_create_smb4acl
the ACEs should be talloc children of the ACL itself and not be placed on talloc_tos() Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/nfs4_acls.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c
index 48b045feb0..1b691c3b5f 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"));