diff options
| author | Doug Barton <dougb@FreeBSD.org> | 2009-12-14 21:51:36 +0000 |
|---|---|---|
| committer | Doug Barton <dougb@FreeBSD.org> | 2009-12-14 21:51:36 +0000 |
| commit | 597be8d64cd844871a6c9171224b37e03e0a300d (patch) | |
| tree | 51d1badd7a6584702225a2102ec08d9a8b0b0eb2 /contrib | |
| parent | d265845e3096a5da928414a610f40f4aa1f80ffc (diff) | |
Notes
Diffstat (limited to 'contrib')
| -rw-r--r-- | contrib/bind9/bin/dig/dighost.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/contrib/bind9/bin/dig/dighost.c b/contrib/bind9/bin/dig/dighost.c index 8736c0cc75c5..badc8251698f 100644 --- a/contrib/bind9/bin/dig/dighost.c +++ b/contrib/bind9/bin/dig/dighost.c @@ -2539,10 +2539,12 @@ connect_done(isc_task_t *task, isc_event_t *event) { if (sevent->result == ISC_R_CANCELED) { debug("in cancel handler"); - isc_socket_detach(&query->sock); - sockcount--; - INSIST(sockcount >= 0); - debug("sockcount=%d", sockcount); + if (query->sock != NULL) { + isc_socket_detach(&query->sock); + sockcount--; + INSIST(sockcount >= 0); + debug("sockcount=%d", sockcount); + } query->waiting_connect = ISC_FALSE; isc_event_free(&event); l = query->lookup; |
