From b6e323bcf61c0db013122f321c11dba4211af17e Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 6 Dec 2013 09:26:25 +0000 Subject: [PATCH] secacl: Don't use talloc_zero We initialize all but one field anyway Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- libcli/security/secacl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcli/security/secacl.c b/libcli/security/secacl.c index b97087b0dda..57788004546 100644 --- a/libcli/security/secacl.c +++ b/libcli/security/secacl.c @@ -38,12 +38,15 @@ struct security_acl *make_sec_acl(TALLOC_CTX *ctx, struct security_acl *dst; int i; - if((dst = talloc_zero(ctx, struct security_acl)) == NULL) + dst = talloc(ctx, struct security_acl); + if (dst == NULL) { return NULL; + } dst->revision = revision; dst->num_aces = num_aces; dst->size = SEC_ACL_HEADER_SIZE; + dst->aces = NULL; /* Now we need to return a non-NULL address for the ace list even if the number of aces required is zero. This is because there -- 2.34.1