summaryrefslogtreecommitdiff
path: root/source4/libcli/raw
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/raw')
-rw-r--r--source4/libcli/raw/clisocket.c4
-rw-r--r--source4/libcli/raw/clitree.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/source4/libcli/raw/clisocket.c b/source4/libcli/raw/clisocket.c
index 37188f4e77..14862a39f0 100644
--- a/source4/libcli/raw/clisocket.c
+++ b/source4/libcli/raw/clisocket.c
@@ -37,11 +37,11 @@ static int sock_destructor(void *ptr)
/*
create a smbcli_socket context
*/
-struct smbcli_socket *smbcli_sock_init(void)
+struct smbcli_socket *smbcli_sock_init(TALLOC_CTX *mem_ctx)
{
struct smbcli_socket *sock;
- sock = talloc_p(NULL, struct smbcli_socket);
+ sock = talloc_p(mem_ctx, struct smbcli_socket);
if (!sock) {
return NULL;
}
diff --git a/source4/libcli/raw/clitree.c b/source4/libcli/raw/clitree.c
index f19cbf8e28..77fe0ebe2f 100644
--- a/source4/libcli/raw/clitree.c
+++ b/source4/libcli/raw/clitree.c
@@ -151,7 +151,8 @@ NTSTATUS smb_tree_disconnect(struct smbcli_tree *tree)
a convenient function to establish a smbcli_tree from scratch, using reasonable default
parameters
*/
-NTSTATUS smbcli_tree_full_connection(struct smbcli_tree **ret_tree,
+NTSTATUS smbcli_tree_full_connection(TALLOC_CTX *parent_ctx,
+ struct smbcli_tree **ret_tree,
const char *my_name,
const char *dest_host, int port,
const char *service, const char *service_type,
@@ -172,7 +173,7 @@ NTSTATUS smbcli_tree_full_connection(struct smbcli_tree **ret_tree,
*ret_tree = NULL;
- sock = smbcli_sock_init();
+ sock = smbcli_sock_init(parent_ctx);
if (!sock) {
return NT_STATUS_NO_MEMORY;
}