mirror of
https://github.com/moparisthebest/curl
synced 2024-11-12 04:25:08 -05:00
ares: check for NULL in completed-callback
This commit is contained in:
parent
1b76c38904
commit
c8373e3dfc
@ -475,17 +475,19 @@ static void query_completed_cb(void *arg, /* (struct connectdata *) */
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
res = (struct ResolverResults *)conn->async.os_specific;
|
res = (struct ResolverResults *)conn->async.os_specific;
|
||||||
res->num_pending--;
|
if(res) {
|
||||||
|
res->num_pending--;
|
||||||
|
|
||||||
if(CURL_ASYNC_SUCCESS == status) {
|
if(CURL_ASYNC_SUCCESS == status) {
|
||||||
Curl_addrinfo *ai = Curl_he2ai(hostent, conn->async.port);
|
Curl_addrinfo *ai = Curl_he2ai(hostent, conn->async.port);
|
||||||
if(ai) {
|
if(ai) {
|
||||||
compound_results(res, ai);
|
compound_results(res, ai);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
/* A successful result overwrites any previous error */
|
||||||
|
if(res->last_status != ARES_SUCCESS)
|
||||||
|
res->last_status = status;
|
||||||
}
|
}
|
||||||
/* A successful result overwrites any previous error */
|
|
||||||
if(res->last_status != ARES_SUCCESS)
|
|
||||||
res->last_status = status;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user