secacl: Don't use talloc_zero
authorVolker Lendecke <vl@samba.org>
Fri, 6 Dec 2013 09:26:25 +0000 (09:26 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 13 Dec 2013 20:45:57 +0000 (12:45 -0800)
We initialize all but one field anyway

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
libcli/security/secacl.c

index b97087b0ddaa4741835a79147af936b6856923a4..57788004546f46af8491c357c5125ac33e4ea93b 100644 (file)
@@ -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