Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d55e9ae

Browse files
committed
Cleanup more code related to ws2_32.dll loading in src/port/getaddrinfo.c
e2e0219 has removed a code path for Windows 2000 that attempts to load wship6.dll as fallback if ws2_32.dll is found but not getaddrinfo(), leaving behind a dangling pointer as the library is freed. However, there is no point in this check as ws2_32.dll exists since Windows XP, so just remove the duplicated check. Reported-by: Tom Lane Discussion: https://postgr.es/m/9781.1582146114@sss.pgh.pa.us
1 parent 6a8e560 commit d55e9ae

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/port/getaddrinfo.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,6 @@ haveNativeWindowsIPv6routines(void)
7474
*/
7575
hLibrary = LoadLibraryA("ws2_32");
7676

77-
if (hLibrary == NULL || GetProcAddress(hLibrary, "getaddrinfo") == NULL)
78-
{
79-
/*
80-
* Well, ws2_32 doesn't exist, or more likely doesn't have
81-
* getaddrinfo.
82-
*/
83-
if (hLibrary != NULL)
84-
FreeLibrary(hLibrary);
85-
}
86-
8777
/* If hLibrary is null, we couldn't find a dll with functions */
8878
if (hLibrary != NULL)
8979
{

0 commit comments

Comments
 (0)