sunos: fix uv_getaddrinfo() NULL pointer dereference
This commit is contained in:
parent
5639b2f1f9
commit
deb1c34774
@ -291,7 +291,12 @@ static int uv_getaddrinfo_done(eio_req* req_) {
|
||||
uv_getaddrinfo_t* req = req_->data;
|
||||
struct addrinfo *res = req->res;
|
||||
#if __sun
|
||||
size_t hostlen = strlen(req->hostname);
|
||||
size_t hostlen;
|
||||
|
||||
if (req->hostname)
|
||||
hostlen = strlen(req->hostname);
|
||||
else
|
||||
hostlen = 0;
|
||||
#endif
|
||||
|
||||
req->res = NULL;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user