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
This commit is contained in:
parent
5c670c33fc
commit
48a8495574
@ -2604,10 +2604,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;
|
||||
|
Loading…
Reference in New Issue
Block a user