summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-09-20 04:57:45 +0200
committerStefan Metzmacher <metze@samba.org>2011-09-28 00:24:43 +0200
commit889886c212935e16ebb763cb2afbc9b6f74f1acd (patch)
treef486576c7c77d6bf81249b06ac9db87a03362406 /source3
parenteb245091e59402780d8a2136a30e0cf31398f7cf (diff)
downloadsamba-889886c212935e16ebb763cb2afbc9b6f74f1acd.tar.gz
samba-889886c212935e16ebb763cb2afbc9b6f74f1acd.tar.bz2
samba-889886c212935e16ebb763cb2afbc9b6f74f1acd.zip
s3:libsmb: call TALLOC_FREE(subreq) directly after cli_sesssetup_blob_recv()
cli_sesssetup_blob_recv() talloc moves stuff that's needed on the given memory context. metze
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/cliconnect.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index fbd25b12b9..d2512ec295 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -1464,8 +1464,8 @@ static void cli_session_setup_kerberos_done(struct tevent_req *subreq)
NTSTATUS status;
status = cli_sesssetup_blob_recv(subreq, talloc_tos(), NULL, &inbuf);
+ TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
- TALLOC_FREE(subreq);
tevent_req_nterror(req, status);
return;
}
@@ -1475,11 +1475,10 @@ static void cli_session_setup_kerberos_done(struct tevent_req *subreq)
if (cli_simple_set_signing(state->cli, state->session_key_krb5,
data_blob_null)
&& !cli_check_sign_mac(state->cli, inbuf, 1)) {
- TALLOC_FREE(subreq);
tevent_req_nterror(req, NT_STATUS_ACCESS_DENIED);
return;
}
- TALLOC_FREE(subreq);
+
tevent_req_done(req);
}