Commit 95709db2 authored by Mingc's avatar Mingc Committed by Alex Hultman

Fix memory leak when getting INVALID_SOCKET (#577)

parent 3694e43c
......@@ -99,6 +99,7 @@ public:
uv_os_sock_t fd = netContext->createSocket(result->ai_family, result->ai_socktype, result->ai_protocol);
if (fd == INVALID_SOCKET) {
freeaddrinfo(result);
return nullptr;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment