summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-02-02 13:41:40 +0100
committerMichael Adam <obnox@samba.org>2012-02-03 11:10:30 +0100
commit6a93475dd04236133cee4327087ccaef69a05225 (patch)
tree10eb682a7c28b804061d67b427015526763bfe2d /source4/libcli
parent97823b69e9624a1cd59a42fe4c6a6e14896b7ae7 (diff)
downloadsamba-6a93475dd04236133cee4327087ccaef69a05225.tar.gz
samba-6a93475dd04236133cee4327087ccaef69a05225.tar.bz2
samba-6a93475dd04236133cee4327087ccaef69a05225.zip
s4:libcli:smb2: don't allocate the smb2_tree struct earlier than necessary in smb2_connect()
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/smb2/connect.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/libcli/smb2/connect.c b/source4/libcli/smb2/connect.c
index b28013fc94..a6a5690bf1 100644
--- a/source4/libcli/smb2/connect.c
+++ b/source4/libcli/smb2/connect.c
@@ -202,11 +202,6 @@ static void smb2_connect_session_done(struct tevent_req *subreq)
return;
}
- state->tree = smb2_tree_init(state->session, state, true);
- if (tevent_req_nomem(state->tree, req)) {
- return;
- }
-
state->tcon.in.reserved = 0;
state->tcon.in.path = talloc_asprintf(state, "\\\\%s\\%s",
state->host, state->share);
@@ -237,6 +232,11 @@ static void smb2_connect_tcon_done(struct smb2_request *smb2req)
return;
}
+ state->tree = smb2_tree_init(state->session, state, true);
+ if (tevent_req_nomem(state->tree, req)) {
+ return;
+ }
+
state->tree->tid = state->tcon.out.tid;
tevent_req_done(req);