s4-winbindd: Do not ask for a tree that we will not use
[samba.git] / source4 / winbind / wb_cmd_list_trustdom.c
index 5f132ef12fb6e7a6dbacde59cb3db3d57d13e638..899de61c078076ab5dd486b6816f274b3136c961 100644 (file)
@@ -76,14 +76,10 @@ static void cmd_list_trustdoms_recv_domain(struct composite_context *ctx)
                talloc_get_type(ctx->async.private_data,
                                struct cmd_list_trustdom_state);
        struct wbsrv_domain *domain;
-       struct smbcli_tree *tree;
 
        state->ctx->status = wb_sid2domain_recv(ctx, &domain);
        if (!composite_is_ok(state->ctx)) return;
 
-       tree = dcerpc_smb_tree(domain->libnet_ctx->lsa.pipe->conn);
-       if (composite_nomem(tree, state->ctx)) return;
-
        ctx = wb_init_lsa_send(state, domain);
        composite_continue(state->ctx, ctx, cmd_list_trustdoms_recv_lsa,
                           state);