s3-rpc_client remove cli_auth_ntlmssp_data_destructor
authorAndrew Bartlett <abartlet@samba.org>
Mon, 17 Oct 2011 09:00:02 +0000 (20:00 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 18 Oct 2011 10:25:30 +0000 (12:25 +0200)
This can be an ordinary talloc child without causing any problem.

This seems to have been inherited from a time when ntlmssp_client_start()
returned malloc() based memory.

Andrew Bartlett

source3/rpc_client/cli_pipe.c

index 65bc028c41904c2a97e4b883d401c4a425ab30a1..247e4867f97cde0f49f833a051136f249b3c50cd 100644 (file)
@@ -2256,12 +2256,6 @@ NTSTATUS rpccli_anon_bind_data(TALLOC_CTX *mem_ctx,
        return NT_STATUS_OK;
 }
 
-static int cli_auth_ntlmssp_data_destructor(struct pipe_auth_data *auth)
-{
-       TALLOC_FREE(auth->auth_ctx);
-       return 0;
-}
-
 static NTSTATUS rpccli_ntlmssp_bind_data(TALLOC_CTX *mem_ctx,
                                  enum dcerpc_AuthType auth_type,
                                  enum dcerpc_AuthLevel auth_level,
@@ -2289,7 +2283,7 @@ static NTSTATUS rpccli_ntlmssp_bind_data(TALLOC_CTX *mem_ctx,
                goto fail;
        }
 
-       status = auth_ntlmssp_client_start(NULL,
+       status = auth_ntlmssp_client_start(result,
                                      lp_netbios_name(),
                                      lp_workgroup(),
                                      lp_client_ntlmv2_auth(),
@@ -2298,8 +2292,6 @@ static NTSTATUS rpccli_ntlmssp_bind_data(TALLOC_CTX *mem_ctx,
                goto fail;
        }
 
-       talloc_set_destructor(result, cli_auth_ntlmssp_data_destructor);
-
        status = auth_ntlmssp_set_username(ntlmssp_ctx, username);
        if (!NT_STATUS_IS_OK(status)) {
                goto fail;