summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-12-22 16:49:48 +0100
committerStefan Metzmacher <metze@samba.org>2011-12-23 10:36:19 +0100
commit2bc7b8f4c9992f5f825d8328e0353f793d7e7ebf (patch)
treef017233c82f8f66932aaf37456c0497f89622c4c /source4
parenteddf0d0fe277cc763bbe0bb4706ab1a4aebf8151 (diff)
downloadsamba-2bc7b8f4c9992f5f825d8328e0353f793d7e7ebf.tar.gz
samba-2bc7b8f4c9992f5f825d8328e0353f793d7e7ebf.tar.bz2
samba-2bc7b8f4c9992f5f825d8328e0353f793d7e7ebf.zip
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>
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/finddcs_nbt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/libcli/finddcs_nbt.c b/source4/libcli/finddcs_nbt.c
index 9579a9e449..6a5d1fd856 100644
--- a/source4/libcli/finddcs_nbt.c
+++ b/source4/libcli/finddcs_nbt.c
@@ -284,7 +284,6 @@ NTSTATUS finddcs_nbt_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
*num_dcs = state->num_dcs;
*dcs = talloc_steal(mem_ctx, state->dcs);
}
- talloc_free(req);
return status;
}
@@ -298,6 +297,7 @@ NTSTATUS finddcs_nbt(TALLOC_CTX *mem_ctx,
struct imessaging_context *msg_ctx,
int *num_dcs, struct nbt_dc_name **dcs)
{
+ NTSTATUS status;
struct tevent_req *req = finddcs_nbt_send(mem_ctx,
my_netbios_name,
nbt_port,
@@ -305,5 +305,7 @@ NTSTATUS finddcs_nbt(TALLOC_CTX *mem_ctx,
domain_sid,
resolve_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;
}