Date: Mon, 14 Dec 2009 21:51:36 +0000 (UTC) From: Doug Barton <dougb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r200547 - stable/7/contrib/bind9/bin/dig Message-ID: <200912142151.nBELpa6f039547@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dougb Date: Mon Dec 14 21:51:36 2009 New Revision: 200547 URL: http://svn.freebsd.org/changeset/base/200547 Log: Wrap some socket handling code in a !NULL bow This patch or something similar will likely be included in a future BIND release. PR: bin/138061 Submitted by: Michael Baker <michael.baker@diversit.com.au> Original patch submitted by: Volker <volker@vwsoft.com> Patch reviewed and tweaked by: ISC Modified: stable/7/contrib/bind9/bin/dig/dighost.c Directory Properties: stable/7/contrib/bind9/ (props changed) Modified: stable/7/contrib/bind9/bin/dig/dighost.c ============================================================================== --- stable/7/contrib/bind9/bin/dig/dighost.c Mon Dec 14 21:50:34 2009 (r200546) +++ stable/7/contrib/bind9/bin/dig/dighost.c Mon Dec 14 21:51:36 2009 (r200547) @@ -2539,10 +2539,12 @@ connect_done(isc_task_t *task, isc_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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912142151.nBELpa6f039547>