This completes the regression fix of commit
7e091e505156381e385235ab4518b4d133a98497.
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
(cherry picked from commit
9a513304adadd79d1c63d55fcf06b67ed45d43ba)
status = dcerpc_lsa_LookupSids3_recv(subreq, state->mem_ctx,
&state->wb.result);
TALLOC_FREE(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)));
if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
DEBUG(0,(__location__ ": IRPC callback failed %s\n",
nt_errstr(status)));
finished:
state->r.out.result = status;
dcesrv_lsa_LookupSids_base_map(state);
finished:
state->r.out.result = status;
dcesrv_lsa_LookupSids_base_map(state);
status = dcesrv_reply(dce_call);
if (!NT_STATUS_IS_OK(status)) {
status = dcesrv_reply(dce_call);
if (!NT_STATUS_IS_OK(status)) {
state->r.out.result = status;
dcesrv_lsa_LookupSids_base_map(state);
state->r.out.result = status;
dcesrv_lsa_LookupSids_base_map(state);
state->r.out.result = status;
dcesrv_lsa_LookupSids_base_map(state);
state->r.out.result = status;
dcesrv_lsa_LookupSids_base_map(state);
status = dcerpc_lsa_LookupNames4_recv(subreq, state->mem_ctx,
&state->wb.result);
TALLOC_FREE(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)));
if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
DEBUG(0,(__location__ ": IRPC callback failed %s\n",
nt_errstr(status)));
finished:
state->r.out.result = status;
dcesrv_lsa_LookupNames_base_map(state);
finished:
state->r.out.result = status;
dcesrv_lsa_LookupNames_base_map(state);
status = dcesrv_reply(dce_call);
if (!NT_STATUS_IS_OK(status)) {
status = dcesrv_reply(dce_call);
if (!NT_STATUS_IS_OK(status)) {
state->r.out.result = status;
dcesrv_lsa_LookupNames_base_map(state);
state->r.out.result = status;
dcesrv_lsa_LookupNames_base_map(state);
state->r.out.result = status;
dcesrv_lsa_LookupNames_base_map(state);
state->r.out.result = status;
dcesrv_lsa_LookupNames_base_map(state);