posix_acls: Use talloc_zero_array
[metze/samba/wip.git] / source3 / smbd / posix_acls.c
index ae667ef9dc080663e15906242f9759c4c13e2d7d..72bb9fe086ee91e5c5cb7b51f195908d486f9bbc 100644 (file)
@@ -3359,7 +3359,7 @@ static NTSTATUS posix_get_nt_acl_common(struct connection_struct *conn,
                        num_acls = count_canon_ace_list(file_ace);
                        num_def_acls = count_canon_ace_list(dir_ace);
 
-                       nt_ace_list = talloc_array(
+                       nt_ace_list = talloc_zero_array(
                                talloc_tos(), struct security_ace,
                                num_acls + num_profile_acls + num_def_acls);
 
@@ -3368,8 +3368,6 @@ static NTSTATUS posix_get_nt_acl_common(struct connection_struct *conn,
                                goto done;
                        }
 
-                       memset(nt_ace_list, '\0', (num_acls + num_def_acls) * sizeof(struct security_ace) );
-
                        /*
                         * Create the NT ACE list from the canonical ace lists.
                         */