Michael Paquier <michael@paquier.xyz> writes:
> Clean up some code, comments and docs referring to Windows 2000 and older
Surely this patch broke the error case in haveNativeWindowsIPv6routines()?
That is, in the admittedly unlikely case that LoadLibraryA("ws2_32")
succeeds but GetProcAddress(hLibrary, "getaddrinfo") doesn't, what you
now have will do FreeLibrary(hLibrary) and then proceed to use the
now-dangling hLibrary pointer anyway.
It looks to me like you should just remove this whole stanza now:
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);
}
regards, tom lane