From 889886c212935e16ebb763cb2afbc9b6f74f1acd Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 20 Sep 2011 04:57:45 +0200 Subject: 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 --- source3/libsmb/cliconnect.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source3') 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); } -- cgit