Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d55e9ae

Browse filesBrowse 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
Copy full SHA for d55e9ae

File tree

Expand file treeCollapse file tree

1 file changed

+0
-10
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-10
lines changed

‎src/port/getaddrinfo.c

Copy file name to clipboardExpand all lines: src/port/getaddrinfo.c
-10Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.