nfs4acls: Use talloc_zero_array()
authorVolker Lendecke <vl@samba.org>
Tue, 11 Aug 2015 11:34:35 +0000 (13:34 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 13 Aug 2015 12:40:16 +0000 (14:40 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/modules/nfs4_acls.c

index 2cf0ebe797edbdd9d45cd0ce0aaa05fde996d2f9..fda4728e8c0e124f3d162384f82aca6755f03ebb 100644 (file)
@@ -317,8 +317,8 @@ static bool smbacl4_nfs42win(TALLOC_CTX *mem_ctx,
 
        DEBUG(10, ("%s entered\n", __func__));
 
-       nt_ace_list = (struct security_ace *)TALLOC_ZERO_SIZE(
-               mem_ctx, 2 * acl->naces * sizeof(struct security_ace));
+       nt_ace_list = talloc_zero_array(mem_ctx, struct security_ace,
+                                       2 * acl->naces);
        if (nt_ace_list==NULL)
        {
                DEBUG(10, ("talloc error with %d aces", acl->naces));