summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier2020-02-20 02:57:41 +0000
committerMichael Paquier2020-02-20 02:57:41 +0000
commitd55e9ae2633ee462d554dddc08d640d725dd6494 (patch)
tree5984ca0dd44e9ba9a044d10c73ea9acdfd7c8a50
parent6a8e5605b53561464c53006337596699f41b1de2 (diff)
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/[email protected]
-rw-r--r--src/port/getaddrinfo.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/port/getaddrinfo.c b/src/port/getaddrinfo.c
index c59a10fbbc..3b51eea481 100644
--- a/src/port/getaddrinfo.c
+++ b/src/port/getaddrinfo.c
@@ -74,16 +74,6 @@ haveNativeWindowsIPv6routines(void)
*/
hLibrary = LoadLibraryA("ws2_32");
- if (hLibrary == NULL || GetProcAddress(hLibrary, "getaddrinfo") == NULL)
- {
- /*
- * Well, ws2_32 doesn't exist, or more likely doesn't have
- * getaddrinfo.
- */
- if (hLibrary != NULL)
- FreeLibrary(hLibrary);
- }
-
/* If hLibrary is null, we couldn't find a dll with functions */
if (hLibrary != NULL)
{