From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Clean up some code, comments and docs referring to Windows 2000
Date: Wed, 19 Feb 2020 16:01:54 -0500
Message-ID: <9781.1582146114@sss.pgh.pa.us> (raw)
In-Reply-To: <E1j4GrA-0006wL-WE@gemulon.postgresql.org>
References: <E1j4GrA-0006wL-WE@gemulon.postgresql.org>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Clean up some code, comments and docs referring to Windows 2000
In-Reply-To: <9781.1582146114@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox