summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-11-21 16:30:09 +0100
committerStefan Metzmacher <metze@samba.org>2011-11-24 19:02:33 +0100
commitcc67f7e5489cdafbb5b365416a533f79c63e9060 (patch)
tree6efb0b155585bab2dd57a00475174d6c2c3badf9
parentd287fe5399db463c0d10ad764d56926619e95ada (diff)
downloadsamba-cc67f7e5489cdafbb5b365416a533f79c63e9060.tar.gz
samba-cc67f7e5489cdafbb5b365416a533f79c63e9060.tar.bz2
samba-cc67f7e5489cdafbb5b365416a533f79c63e9060.zip
s3:smb2cli: free session in smb2cli_logoff*
metze
-rw-r--r--source3/libsmb/smb2cli_session.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/libsmb/smb2cli_session.c b/source3/libsmb/smb2cli_session.c
index e060f316ef..d1d65f3f43 100644
--- a/source3/libsmb/smb2cli_session.c
+++ b/source3/libsmb/smb2cli_session.c
@@ -241,6 +241,7 @@ NTSTATUS smb2cli_session_setup_recv(struct tevent_req *req,
}
struct smb2cli_logoff_state {
+ struct cli_state *cli;
uint8_t fixed[4];
};
@@ -258,6 +259,7 @@ struct tevent_req *smb2cli_logoff_send(TALLOC_CTX *mem_ctx,
if (req == NULL) {
return NULL;
}
+ state->cli = cli;
SSVAL(state->fixed, 0, 4);
subreq = smb2cli_req_send(state, ev,
@@ -281,6 +283,9 @@ static void smb2cli_logoff_done(struct tevent_req *subreq)
struct tevent_req *req =
tevent_req_callback_data(subreq,
struct tevent_req);
+ struct smb2cli_logoff_state *state =
+ tevent_req_data(req,
+ struct smb2cli_logoff_state);
NTSTATUS status;
struct iovec *iov;
static const struct smb2cli_req_expected_response expected[] = {
@@ -290,9 +295,10 @@ static void smb2cli_logoff_done(struct tevent_req *subreq)
}
};
- status = smb2cli_req_recv(subreq, talloc_tos(), &iov,
+ status = smb2cli_req_recv(subreq, state, &iov,
expected, ARRAY_SIZE(expected));
TALLOC_FREE(subreq);
+ TALLOC_FREE(state->cli->smb2.session);
if (tevent_req_nterror(req, status)) {
return;
}