Author: tridge Date: 2005-07-26 07:23:57 +0000 (Tue, 26 Jul 2005) New Revision: 8777
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8777 Log: make sure that the tree connect is a child of the return cli state structure. This fixes the BASE-DISCONNECT test Modified: branches/SAMBA_4_0/source/libcli/cliconnect.c Changeset: Modified: branches/SAMBA_4_0/source/libcli/cliconnect.c =================================================================== --- branches/SAMBA_4_0/source/libcli/cliconnect.c 2005-07-26 07:23:11 UTC (rev 8776) +++ branches/SAMBA_4_0/source/libcli/cliconnect.c 2005-07-26 07:23:57 UTC (rev 8777) @@ -154,6 +154,8 @@ (*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 @@ ****************************************************************************/ 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); } /*