1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

s4:libcli/finddcs_nbt.c - free "req" consistently with "finddcs_cldap.c"

It is more obvious to free where the context for the first time appears.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Matthias Dieter Wallnöfer 2011-12-22 16:49:48 +01:00 committed by Stefan Metzmacher
parent eddf0d0fe2
commit 2bc7b8f4c9

View File

@ -284,7 +284,6 @@ NTSTATUS finddcs_nbt_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
*num_dcs = state->num_dcs; *num_dcs = state->num_dcs;
*dcs = talloc_steal(mem_ctx, state->dcs); *dcs = talloc_steal(mem_ctx, state->dcs);
} }
talloc_free(req);
return status; return status;
} }
@ -298,6 +297,7 @@ NTSTATUS finddcs_nbt(TALLOC_CTX *mem_ctx,
struct imessaging_context *msg_ctx, struct imessaging_context *msg_ctx,
int *num_dcs, struct nbt_dc_name **dcs) int *num_dcs, struct nbt_dc_name **dcs)
{ {
NTSTATUS status;
struct tevent_req *req = finddcs_nbt_send(mem_ctx, struct tevent_req *req = finddcs_nbt_send(mem_ctx,
my_netbios_name, my_netbios_name,
nbt_port, nbt_port,
@ -305,5 +305,7 @@ NTSTATUS finddcs_nbt(TALLOC_CTX *mem_ctx,
domain_sid, domain_sid,
resolve_ctx, resolve_ctx,
event_ctx, msg_ctx); event_ctx, msg_ctx);
return finddcs_nbt_recv(req, mem_ctx, num_dcs, dcs); status = finddcs_nbt_recv(req, mem_ctx, num_dcs, dcs);
talloc_free(req);
return status;
} }