From: Daniel Gustafsson <dgustafsson@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Close socket in case of errors in setting non-blocking
Date: Wed, 17 Jan 2024 10:35:27 +0000
Message-ID: <E1rQ3GZ-001paW-QE@gemulon.postgresql.org> (raw)
Close socket in case of errors in setting non-blocking
If configuring the newly created socket non-blocking fails we
error out and return INVALID_SOCKET, but the socket that had
been created wasn't closed. Fix by issuing closesocket in the
errorpath.
Backpatch to all supported branches.
Author: Ranier Vilela <ranier.vf@gmail.com>
Discussion: https://postgr.es/m/CAEudQApmU5CrKefH85VbNYE2y8H=-qqEJbg6RAPU65+vCe+89A@mail.gmail.com
Backpatch-through: v12
Branch
------
REL_13_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/a6463d287b4a313994760a315461d6af86da1873
Modified Files
--------------
src/backend/port/win32/socket.c | 1 +
1 file changed, 1 insertion(+)
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: dgustafsson@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Close socket in case of errors in setting non-blocking
In-Reply-To: <E1rQ3GZ-001paW-QE@gemulon.postgresql.org>
* 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