From 04458c8b5da001294e820289b34bf3aee6258f27 Mon Sep 17 00:00:00 2001 From: Michael Graff Date: Thu, 6 Jan 2000 23:01:07 +0000 Subject: [PATCH] fix a bug pointed out by Andreas -- don't detach from socket then use it. --- lib/dns/dispatch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c index 9a6861c3fc..a350ad9ef7 100644 --- a/lib/dns/dispatch.c +++ b/lib/dns/dispatch.c @@ -218,8 +218,6 @@ destroy(dns_dispatch_t *disp) XDEBUG(("dispatch::destroy: detaching from sock %p and task %p\n", disp->socket, disp->task)); - isc_socket_detach(&disp->socket); - isc_task_detach(&disp->task); /* * Final cleanup of packets on the request list. @@ -236,6 +234,9 @@ destroy(dns_dispatch_t *disp) INSIST(disp->requests == 0); INSIST(disp->recvs == 0); + isc_socket_detach(&disp->socket); + isc_task_detach(&disp->task); + isc_mempool_put(disp->epool, disp->failsafe_ev); disp->failsafe_ev = NULL;