summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/xplogin.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/source4/torture/rpc/xplogin.c b/source4/torture/rpc/xplogin.c
index 25bda40da9..3c4a881d96 100644
--- a/source4/torture/rpc/xplogin.c
+++ b/source4/torture/rpc/xplogin.c
@@ -28,13 +28,6 @@
#include "librpc/gen_ndr/ndr_srvsvc.h"
#include "libcli/composite/composite.h"
-static int destroy_transport(void *ptr)
-{
- struct smbcli_transport *trans = ptr;
- talloc_free(trans->socket);
- return 0;
-}
-
static NTSTATUS after_negprot(struct smbcli_transport **dst_transport,
const char *dest_host, uint16_t port,
const char *my_name)
@@ -54,13 +47,10 @@ static NTSTATUS after_negprot(struct smbcli_transport **dst_transport,
return NT_STATUS_UNSUCCESSFUL;
}
- transport = smbcli_transport_init(sock);
- talloc_free(sock);
+ transport = smbcli_transport_init(sock, NULL, True);
if (transport == NULL)
return NT_STATUS_NO_MEMORY;
- talloc_set_destructor(transport, destroy_transport);
-
{
struct nbt_name calling;
struct nbt_name called;
@@ -115,7 +105,7 @@ static NTSTATUS anon_ipc(struct smbcli_transport *transport,
TALLOC_CTX *mem_ctx;
NTSTATUS status;
- session = smbcli_session_init(transport);
+ session = smbcli_session_init(transport, NULL, True);
if (session == NULL)
return NT_STATUS_NO_MEMORY;
@@ -144,8 +134,7 @@ static NTSTATUS anon_ipc(struct smbcli_transport *transport,
talloc_set_destructor(session, destroy_session);
- tree = smbcli_tree_init(session);
- talloc_free(session);
+ tree = smbcli_tree_init(session, NULL, True);
if (tree == NULL) {
talloc_free(mem_ctx);
return NT_STATUS_NO_MEMORY;