Jacek Caban : ws2_32: Added FreeAddrInfoEx implementation.
Alexandre Julliard
julliard at winehq.org
Wed Aug 2 15:31:59 CDT 2017
Module: wine
Branch: master
Commit: 001a8a4f2725dc48f989b0aafdc2d6145ee31237
URL: http://source.winehq.org/git/wine.git/?a=commit;h=001a8a4f2725dc48f989b0aafdc2d6145ee31237
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue Aug 1 18:29:31 2017 +0200
ws2_32: Added FreeAddrInfoEx implementation.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ws2_32/socket.c | 12 +++++++++++-
include/ws2tcpip.h | 1 +
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index e1cc15f..71241c6 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -6959,7 +6959,17 @@ void WINAPI FreeAddrInfoW(PADDRINFOW ai)
*/
void WINAPI FreeAddrInfoExW(ADDRINFOEXW *ai)
{
- FIXME("%p\n", ai);
+ TRACE("(%p)\n", ai);
+
+ while (ai)
+ {
+ ADDRINFOEXW *next;
+ HeapFree(GetProcessHeap(), 0, ai->ai_canonname);
+ HeapFree(GetProcessHeap(), 0, ai->ai_addr);
+ next = ai->ai_next;
+ HeapFree(GetProcessHeap(), 0, ai);
+ ai = next;
+ }
}
int WINAPI WS_getnameinfo(const SOCKADDR *sa, WS_socklen_t salen, PCHAR host,
diff --git a/include/ws2tcpip.h b/include/ws2tcpip.h
index 2d509be..f12deec 100644
--- a/include/ws2tcpip.h
+++ b/include/ws2tcpip.h
@@ -173,6 +173,7 @@ void WINAPI WS(freeaddrinfo)(LPADDRINFO);
#define FreeAddrInfoA WS(freeaddrinfo)
void WINAPI FreeAddrInfoW(PADDRINFOW);
#define FreeAddrInfo WINELIB_NAME_AW(FreeAddrInfo)
+void WINAPI FreeAddrInfoExW(ADDRINFOEXW*);
int WINAPI WS(getaddrinfo)(const char*,const char*,const struct WS(addrinfo)*,struct WS(addrinfo)**);
#define GetAddrInfoA WS(getaddrinfo)
int WINAPI GetAddrInfoW(PCWSTR,PCWSTR,const ADDRINFOW*,PADDRINFOW*);
More information about the wine-cvs
mailing list