summaryrefslogtreecommitdiffstats
path: root/source4/libcli
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/cliconnect.c6
-rw-r--r--source4/libcli/raw/clitransport.c2
-rw-r--r--source4/libcli/raw/clitree.c8
3 files changed, 8 insertions, 8 deletions
diff --git a/source4/libcli/cliconnect.c b/source4/libcli/cliconnect.c
index d89925eda5..220a450433 100644
--- a/source4/libcli/cliconnect.c
+++ b/source4/libcli/cliconnect.c
@@ -92,7 +92,7 @@ NTSTATUS smbcli_session_setup(struct smbcli_state *cli,
cli->session->vuid = setup.generic.out.vuid;
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
@@ -125,7 +125,7 @@ NTSTATUS smbcli_send_tconX(struct smbcli_state *cli, const char *sharename,
cli->tree->tid = tcon.tconx.out.cnum;
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
@@ -176,7 +176,7 @@ NTSTATUS smbcli_full_connection(struct smbcli_state **ret_cli,
tree->reference_count++;
done:
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c
index cae8e2a3be..2d29ba371f 100644
--- a/source4/libcli/raw/clitransport.c
+++ b/source4/libcli/raw/clitransport.c
@@ -47,7 +47,7 @@ struct smbcli_transport *smbcli_transport_init(struct smbcli_socket *sock)
transport->event.ctx = event_context_init();
if (transport->event.ctx == NULL) {
- talloc_destroy(transport);
+ talloc_free(transport);
return NULL;
}
diff --git a/source4/libcli/raw/clitree.c b/source4/libcli/raw/clitree.c
index 2d642a9a8c..03a49708b3 100644
--- a/source4/libcli/raw/clitree.c
+++ b/source4/libcli/raw/clitree.c
@@ -251,7 +251,7 @@ NTSTATUS smbcli_tree_full_connection(struct smbcli_tree **ret_tree,
status = smb_raw_session_setup(session, mem_ctx, &setup);
if (!NT_STATUS_IS_OK(status)) {
smbcli_session_close(session);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
@@ -260,7 +260,7 @@ NTSTATUS smbcli_tree_full_connection(struct smbcli_tree **ret_tree,
tree = smbcli_tree_init(session);
if (!tree) {
smbcli_session_close(session);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NT_STATUS_NO_MEMORY;
}
@@ -284,7 +284,7 @@ NTSTATUS smbcli_tree_full_connection(struct smbcli_tree **ret_tree,
if (!NT_STATUS_IS_OK(status)) {
smbcli_tree_close(tree);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
@@ -296,7 +296,7 @@ NTSTATUS smbcli_tree_full_connection(struct smbcli_tree **ret_tree,
tree->fs_type = talloc_strdup(tree, tcon.tconx.out.fs_type);
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
*ret_tree = tree;
return NT_STATUS_OK;