int i;
int num = 0;
+ if(!channel)
+ return 0;
+
bitmask = ares_getsock(channel, socks, ARES_GETSOCK_MAXNUM);
for(i = 0; i < ARES_GETSOCK_MAXNUM; i++) {
#endif
#ifdef USE_HTTPSRR_ARES
- ares_destroy(data->state.async.tdata->channel);
+ if(data->state.async.tdata->channel)
+ ares_destroy(data->state.async.tdata->channel);
#endif
/*
* if the thread is still blocking in the resolve syscall, detach it and
}
#ifdef USE_HTTPSRR_ARES
if(resolve_httpsrr(data, asp))
- goto err_exit;
+ infof(data, "Failed HTTPS RR operation");
#endif
return TRUE;
#endif
#ifdef USE_HTTPSRR_ARES
- if(data->state.async.tdata) {
+ if(data->state.async.tdata && data->state.async.tdata->channel) {
ret_val = Curl_ares_getsock(data, data->state.async.tdata->channel, socks);
for(socketi = 0; socketi < (MAX_SOCKSPEREASYHANDLE - 1); socketi++)
if(!ARES_GETSOCK_READABLE(ret_val, socketi) &&