summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-26 07:23:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:30:04 -0500
commitd929f32dbe577b2bd389497433fb0a05c109a04b (patch)
tree2816fb56035b623e1ee93d9bb684775c8c18a140 /source4/libcli
parent528bb470bd138df2de742be696bb31191f9da492 (diff)
downloadsamba-d929f32dbe577b2bd389497433fb0a05c109a04b.tar.gz
samba-d929f32dbe577b2bd389497433fb0a05c109a04b.tar.bz2
samba-d929f32dbe577b2bd389497433fb0a05c109a04b.zip
r8777: make sure that the tree connect is a child of the return cli state structure.
This fixes the BASE-DISCONNECT test (This used to be commit 86fe5817b1abc754763eede64b615dc8c9db5362)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/cliconnect.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source4/libcli/cliconnect.c b/source4/libcli/cliconnect.c
index 489aea82dd..624b54c3f2 100644
--- a/source4/libcli/cliconnect.c
+++ b/source4/libcli/cliconnect.c
@@ -154,6 +154,8 @@ NTSTATUS smbcli_full_connection(TALLOC_CTX *parent_ctx,
(*ret_cli)->tree = tree;
(*ret_cli)->session = tree->session;
(*ret_cli)->transport = tree->session->transport;
+
+ talloc_steal(*ret_cli, tree);
done:
return status;
@@ -173,14 +175,7 @@ NTSTATUS smbcli_tdis(struct smbcli_state *cli)
****************************************************************************/
struct smbcli_state *smbcli_state_init(TALLOC_CTX *mem_ctx)
{
- struct smbcli_state *cli;
-
- cli = talloc_zero(mem_ctx, struct smbcli_state);
- if (cli) {
- ZERO_STRUCTP(cli);
- }
-
- return cli;
+ return talloc_zero(mem_ctx, struct smbcli_state);
}
/*