]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:winbindd: consistently use TALLOC_FREE(conn->foo_pipe) is we create a new connection
authorStefan Metzmacher <metze@samba.org>
Thu, 25 Mar 2010 14:17:07 +0000 (15:17 +0100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 13 Apr 2010 18:18:52 +0000 (20:18 +0200)
metze
(cherry picked from commit 4f391fedac7111683d13f2d79fee7c0dbc27f86e)
(cherry picked from commit c462e54142c00fdd81c2847d16a75119b1cc89fc)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/winbindd/winbindd_cm.c

index 73f431a44913c19467e1ab6342b80a83b2cf8ce0..08684cc3706064b01d5c840bc9ffd5592a0e3131 100644 (file)
@@ -2007,6 +2007,7 @@ NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
                goto done;
        }
 
+       TALLOC_FREE(conn->samr_pipe);
 
        /*
         * No SAMR pipe yet. Attempt to get an NTLMSSP SPNEGO authenticated
@@ -2234,6 +2235,8 @@ NTSTATUS cm_connect_lsa(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
                goto done;
        }
 
+       TALLOC_FREE(conn->lsa_pipe);
+
        if ((conn->cli->user_name[0] == '\0') ||
            (conn->cli->domain[0] == '\0') || 
            (conn->cli->password == NULL || conn->cli->password[0] == '\0')) {
@@ -2366,6 +2369,8 @@ NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
                return NT_STATUS_OK;
        }
 
+       TALLOC_FREE(conn->netlogon_pipe);
+
        result = cli_rpc_pipe_open_noauth(conn->cli,
                                          &ndr_table_netlogon.syntax_id,
                                          &netlogon_pipe);