Re: pgsql: Clean up some code, comments and docs referring to Windows 2000
| От | Tom Lane |
|---|---|
| Тема | Re: pgsql: Clean up some code, comments and docs referring to Windows 2000 |
| Дата | |
| Msg-id | 9781.1582146114@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | pgsql: Clean up some code, comments and docs referring to Windows 2000 (Michael Paquier <michael@paquier.xyz>) |
| Ответы |
Re: pgsql: Clean up some code, comments and docs referring toWindows 2000
|
| Список | pgsql-committers |
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
В списке pgsql-committers по дате отправления: