windows: fix regression when cancelling getaddrinfo

The req->addrinfow field contains the hints in that case, so we must not
free it.

This regression was introduced in f2bb8d3 by yours truly.

PR-URL: https://github.com/libuv/libuv/pull/171
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
Saúl Ibarra Corretgé 2015-01-28 11:00:43 +01:00
parent 150dfdd0b8
commit ba09b39b1c

View File

@ -201,13 +201,13 @@ static void uv__getaddrinfo_done(struct uv__work* w, int status) {
}
}
complete:
/* return memory to system */
if (req->addrinfow != NULL) {
FreeAddrInfoW(req->addrinfow);
req->addrinfow = NULL;
}
complete:
uv__req_unregister(req->loop, req);
/* finally do callback with converted result */