summaryrefslogtreecommitdiff
path: root/source4/dns_server/dns_query.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2015-08-07 07:58:20 +0200
committerRalph Böhme <slow@samba.org>2015-08-07 09:52:13 +0200
commit938636886c0bb2c0cc66976c4c6dc763d589335c (patch)
treec6d9193c4d0a6628416f386777bacaae3d127bf4 /source4/dns_server/dns_query.c
parent7258061e5e9cd4b68f1c010c3667c3fd2b0663cc (diff)
downloadsamba-938636886c0bb2c0cc66976c4c6dc763d589335c.tar.gz
dns_server: Don't call tevent_req_finish twice
Both tevent_req_werror and tevent_req_done call tevent_req_finish on a request. This should not be done. We should only call either of both. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source4/dns_server/dns_query.c')
-rw-r--r--source4/dns_server/dns_query.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source4/dns_server/dns_query.c b/source4/dns_server/dns_query.c
index 94f5d49ec21..5ddfb0ac3ce 100644
--- a/source4/dns_server/dns_query.c
+++ b/source4/dns_server/dns_query.c
@@ -673,11 +673,15 @@ struct tevent_req *dns_server_process_query_send(
err = handle_question(dns, state, &in->questions[0],
&state->answers, &state->ancount,
&state->nsrecs, &state->nscount);
+
+ if (W_ERROR_EQUAL(err, DNS_ERR(NAME_ERROR))) {
+ err = WERR_OK;
+ }
+
if (tevent_req_werror(req, err)) {
- if (!W_ERROR_EQUAL(err, DNS_ERR(NAME_ERROR))) {
- return tevent_req_post(req, ev);
- }
+ return tevent_req_post(req, ev);
}
+
tevent_req_done(req);
return tevent_req_post(req, ev);
}