diff --git a/bin/lwresd/client.c b/bin/lwresd/client.c index c11768487b..837bd239fe 100644 --- a/bin/lwresd/client.c +++ b/bin/lwresd/client.c @@ -275,11 +275,10 @@ client_send(isc_task_t *task, isc_event_t *ev) INSIST(CLIENT_ISSEND(client)); INSIST(client->sendbuf == dev->region.base); - if (client->sendbuf != client->buffer) { + if (client->sendbuf != client->buffer) lwres_context_freemem(cm->lwctx, client->sendbuf, client->sendlength); - client->sendbuf = NULL; - } + client->sendbuf = NULL; client_state_idle(client); } diff --git a/bin/lwresd/process_gabn.c b/bin/lwresd/process_gabn.c index e69b76ff7f..c2ef2dcc6f 100644 --- a/bin/lwresd/process_gabn.c +++ b/bin/lwresd/process_gabn.c @@ -37,6 +37,11 @@ static void process_gabn_finddone(isc_task_t *task, isc_event_t *ev) { + client_t *client = ev->arg; + + dns_adb_destroyfind(&client->v4find); + + isc_event_free(&ev); } static isc_result_t @@ -46,6 +51,8 @@ start_v4find(client_t *client) isc_result_t result; dns_fixedname_t cname; + printf("Starting v4 find for client %p\n", client); + /* * Issue a find for the name contained in the request. We won't * set the bit that says "anything is good enough" -- we want it @@ -107,6 +114,8 @@ start_v6find(client_t *client) unsigned int options; isc_result_t result; + printf("Starting v6 find for client %p\n", client); + /* * Issue a find for the name contained in the request. We won't * set the bit that says "anything is good enough" -- we want it @@ -172,6 +181,8 @@ process_gabn(client_t *client, lwres_buffer_t *b) client->find_pending = 0; client->find_wanted = req->addrtypes; + goto out; + if ((req->addrtypes & LWRES_ADDRTYPE_V4) != 0) { result = start_v4find(client); if (result != ISC_R_SUCCESS)