From: Stefan Metzmacher Date: Thu, 25 Mar 2010 14:17:07 +0000 (+0100) Subject: s3:winbindd: consistently use TALLOC_FREE(conn->foo_pipe) is we create a new connection X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ef6370eaaa307ccfd74012a4b9397312ff747eb;p=thirdparty%2Fsamba.git s3:winbindd: consistently use TALLOC_FREE(conn->foo_pipe) is we create a new connection metze (cherry picked from commit 4f391fedac7111683d13f2d79fee7c0dbc27f86e) (cherry picked from commit c462e54142c00fdd81c2847d16a75119b1cc89fc) Signed-off-by: Stefan Metzmacher --- diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 73f431a4491..08684cc3706 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -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);