From ba09b39b1cab0dc20afe2f917f6e608ea83f8b82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Wed, 28 Jan 2015 11:00:43 +0100 Subject: [PATCH] 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 --- src/win/getaddrinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win/getaddrinfo.c b/src/win/getaddrinfo.c index 3245c6f58..f103f5fbd 100644 --- a/src/win/getaddrinfo.c +++ b/src/win/getaddrinfo.c @@ -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 */