From acf9d61421faa6c0055d57fdee7db300dc5431aa Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 7 Dec 2004 18:25:53 +0000 Subject: r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy. (This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a) --- source3/lib/secacl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/lib/secacl.c') diff --git a/source3/lib/secacl.c b/source3/lib/secacl.c index 756685a821..e213e0d9a0 100644 --- a/source3/lib/secacl.c +++ b/source3/lib/secacl.c @@ -32,7 +32,7 @@ SEC_ACL *make_sec_acl(TALLOC_CTX *ctx, uint16 revision, int num_aces, SEC_ACE *a SEC_ACL *dst; int i; - if((dst = (SEC_ACL *)talloc_zero(ctx,sizeof(SEC_ACL))) == NULL) + if((dst = TALLOC_ZERO_P(ctx,SEC_ACL)) == NULL) return NULL; dst->revision = revision; @@ -46,7 +46,7 @@ SEC_ACL *make_sec_acl(TALLOC_CTX *ctx, uint16 revision, int num_aces, SEC_ACE *a positive number. */ if ((num_aces) && - ((dst->ace = (SEC_ACE *)talloc(ctx, sizeof(SEC_ACE) * num_aces)) + ((dst->ace = TALLOC_ARRAY(ctx, SEC_ACE, num_aces)) == NULL)) { return NULL; } -- cgit