s4:libnet: use talloc_zero(struct libnet_JoinDomain) in libnet_Join_member()
authorStefan Metzmacher <metze@samba.org>
Wed, 16 Nov 2011 14:28:20 +0000 (15:28 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 29 Nov 2011 08:21:25 +0000 (09:21 +0100)
metze

source4/libnet/libnet_join.c

index a1124fdd6239547b658e8a611f24d9998218bcc9..0ed14a54e8ea58fa8ef5b4952663072bced85932 100644 (file)
@@ -909,7 +909,7 @@ NTSTATUS libnet_Join_member(struct libnet_context *ctx,
                return NT_STATUS_NO_MEMORY;
        }
 
-       r2 = talloc(tmp_mem, struct libnet_JoinDomain);
+       r2 = talloc_zero(tmp_mem, struct libnet_JoinDomain);
        if (!r2) {
                r->out.error_string = NULL;
                talloc_free(tmp_mem);
@@ -939,7 +939,6 @@ NTSTATUS libnet_Join_member(struct libnet_context *ctx,
        /*
         * join the domain
         */
-       ZERO_STRUCTP(r2);
        r2->in.domain_name      = r->in.domain_name;
        r2->in.account_name     = account_name;
        r2->in.netbios_name     = netbios_name;