mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s4:lsa_lookup: remove TALLOC_FREE(state) after all dcesrv_lsa_Lookup{Names,Sids}_base_map() calls
This completes the regression fix of commit 7e091e5051
.
There might be strings allocated on state, which are part of the
result.
The reason for the TALLOC_FREE(state) was to cleanup the possible
irpc_handle before leaving the function. Now we call
TALLOC_FREE(state->wb.irpc_handle) explicitly in
dcesrv_lsa_Lookup{Names,Sids}_base_done() instead.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13420
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun May 13 10:27:28 CEST 2018 on sn-devel-144
This commit is contained in:
parent
26c4084ad2
commit
9a513304ad
@ -533,6 +533,7 @@ static void dcesrv_lsa_LookupSids_base_done(struct tevent_req *subreq)
|
||||
status = dcerpc_lsa_LookupSids3_recv(subreq, state->mem_ctx,
|
||||
&state->wb.result);
|
||||
TALLOC_FREE(subreq);
|
||||
TALLOC_FREE(state->wb.irpc_handle);
|
||||
if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
|
||||
DEBUG(0,(__location__ ": IRPC callback failed %s\n",
|
||||
nt_errstr(status)));
|
||||
@ -598,7 +599,6 @@ static void dcesrv_lsa_LookupSids_base_done(struct tevent_req *subreq)
|
||||
finished:
|
||||
state->r.out.result = status;
|
||||
dcesrv_lsa_LookupSids_base_map(state);
|
||||
TALLOC_FREE(state);
|
||||
|
||||
status = dcesrv_reply(dce_call);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
@ -660,7 +660,6 @@ NTSTATUS dcesrv_lsa_LookupSids2(struct dcesrv_call_state *dce_call,
|
||||
|
||||
state->r.out.result = status;
|
||||
dcesrv_lsa_LookupSids_base_map(state);
|
||||
TALLOC_FREE(state);
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -734,7 +733,6 @@ NTSTATUS dcesrv_lsa_LookupSids3(struct dcesrv_call_state *dce_call,
|
||||
|
||||
state->r.out.result = status;
|
||||
dcesrv_lsa_LookupSids_base_map(state);
|
||||
TALLOC_FREE(state);
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -1155,6 +1153,7 @@ static void dcesrv_lsa_LookupNames_base_done(struct tevent_req *subreq)
|
||||
status = dcerpc_lsa_LookupNames4_recv(subreq, state->mem_ctx,
|
||||
&state->wb.result);
|
||||
TALLOC_FREE(subreq);
|
||||
TALLOC_FREE(state->wb.irpc_handle);
|
||||
if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
|
||||
DEBUG(0,(__location__ ": IRPC callback failed %s\n",
|
||||
nt_errstr(status)));
|
||||
@ -1220,7 +1219,6 @@ static void dcesrv_lsa_LookupNames_base_done(struct tevent_req *subreq)
|
||||
finished:
|
||||
state->r.out.result = status;
|
||||
dcesrv_lsa_LookupNames_base_map(state);
|
||||
TALLOC_FREE(state);
|
||||
|
||||
status = dcesrv_reply(dce_call);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
@ -1433,7 +1431,6 @@ NTSTATUS dcesrv_lsa_LookupNames2(struct dcesrv_call_state *dce_call,
|
||||
|
||||
state->r.out.result = status;
|
||||
dcesrv_lsa_LookupNames_base_map(state);
|
||||
TALLOC_FREE(state);
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -1504,7 +1501,6 @@ NTSTATUS dcesrv_lsa_LookupNames(struct dcesrv_call_state *dce_call, TALLOC_CTX *
|
||||
|
||||
state->r.out.result = status;
|
||||
dcesrv_lsa_LookupNames_base_map(state);
|
||||
TALLOC_FREE(state);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user