summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_afsacl.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-12-20 21:14:28 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:42 -0500
commitb46913fb95d59f3ec8e7e71da758cd16cda05f2c (patch)
treed76c481d3fc054023e3ea37ae4858016bce5636c /source3/modules/vfs_afsacl.c
parent84e0aafc78f9d91cde3a6b1c4a57d8ed3b6fd58c (diff)
downloadsamba-b46913fb95d59f3ec8e7e71da758cd16cda05f2c.tar.gz
samba-b46913fb95d59f3ec8e7e71da758cd16cda05f2c.tar.bz2
samba-b46913fb95d59f3ec8e7e71da758cd16cda05f2c.zip
r4291: More *alloc fixes inspired by Albert Chin (china@thewrittenword.com).
Jeremy (This used to be commit efc1b688cf9b1a17f1a6bf46d481280ed8bd0c46)
Diffstat (limited to 'source3/modules/vfs_afsacl.c')
-rw-r--r--source3/modules/vfs_afsacl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/modules/vfs_afsacl.c b/source3/modules/vfs_afsacl.c
index bb82801a00..6d6848eb12 100644
--- a/source3/modules/vfs_afsacl.c
+++ b/source3/modules/vfs_afsacl.c
@@ -85,7 +85,7 @@ static void free_afs_acl(struct afs_acl *acl)
static struct afs_ace *clone_afs_ace(TALLOC_CTX *mem_ctx, struct afs_ace *ace)
{
- struct afs_ace *result = talloc(mem_ctx, sizeof(struct afs_ace));
+ struct afs_ace *result = TALLOC_P(mem_ctx, struct afs_ace);
if (result == NULL)
return NULL;
@@ -169,7 +169,7 @@ static struct afs_ace *new_afs_ace(TALLOC_CTX *mem_ctx,
}
}
- result = talloc(mem_ctx, sizeof(struct afs_ace));
+ result = TALLOC_P(mem_ctx, struct afs_ace);
if (result == NULL) {
DEBUG(0, ("Could not talloc AFS ace\n"));
@@ -619,7 +619,7 @@ 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 = (SEC_ACE *)malloc(afs_acl->num_aces * sizeof(SEC_ACE));
+ nt_ace_list = SMB_MALLOC_ARRAY(SEC_ACE, afs_acl->num_aces);
if (nt_ace_list == NULL)
return 0;