Re: Fix a possible socket leak at Windows (src/backend/port/win32/socket.c)

2024-01-17 Thread Ranier Vilela
Em qua., 17 de jan. de 2024 09:54, Daniel Gustafsson 
escreveu:

> > On 17 Jan 2024, at 07:26, Michael Paquier  wrote:
> > On Tue, Jan 16, 2024 at 05:25:39PM -0300, Ranier Vilela wrote:
>
> >> Do you have plans or should I register for a commitfest?
> >
> > Daniel has stated that he would take care of it, so why not letting
> > him a few days?  I don't think that a CF entry is necessary.
>
> It isn't, I've now committed it backpatched down to 12.
>
Thanks for the commit, Daniel.

Best regards,
Ranier Vilela


Re: Fix a possible socket leak at Windows (src/backend/port/win32/socket.c)

2024-01-17 Thread Daniel Gustafsson
> On 17 Jan 2024, at 07:26, Michael Paquier  wrote:
> On Tue, Jan 16, 2024 at 05:25:39PM -0300, Ranier Vilela wrote:

>> Do you have plans or should I register for a commitfest?
> 
> Daniel has stated that he would take care of it, so why not letting
> him a few days?  I don't think that a CF entry is necessary.

It isn't, I've now committed it backpatched down to 12.

--
Daniel Gustafsson





Re: Fix a possible socket leak at Windows (src/backend/port/win32/socket.c)

2024-01-16 Thread Michael Paquier
On Tue, Jan 16, 2024 at 05:25:39PM -0300, Ranier Vilela wrote:
> Thanks for taking care of this.

Yeah, that's a good catch.

> Do you have plans or should I register for a commitfest?

Daniel has stated that he would take care of it, so why not letting
him a few days?  I don't think that a CF entry is necessary.
--
Michael


signature.asc
Description: PGP signature


Re: Fix a possible socket leak at Windows (src/backend/port/win32/socket.c)

2024-01-16 Thread Ranier Vilela
Em seg., 15 de jan. de 2024 às 09:43, Daniel Gustafsson 
escreveu:

> > On 13 Jan 2024, at 22:38, Ranier Vilela  wrote:
>
> > In the pgwin32_socket function (src/backend/port/win32/socket.c), there
> is a possible socket leak if the socket cannot be made non-blocking.
>
> I don't know Windows well enough to comment on the implications of not
> calling
> closesocket here, but it definitely seems like a prudent thing to do
> backpatched down to 12. Unless objections I'll do that.
>
Thanks for taking care of this.
Do you have plans or should I register for a commitfest?

Best regards,
Ranier Vilela


Re: Fix a possible socket leak at Windows (src/backend/port/win32/socket.c)

2024-01-15 Thread Daniel Gustafsson
> On 13 Jan 2024, at 22:38, Ranier Vilela  wrote:

> In the pgwin32_socket function (src/backend/port/win32/socket.c), there is a 
> possible socket leak if the socket cannot be made non-blocking.

I don't know Windows well enough to comment on the implications of not calling
closesocket here, but it definitely seems like a prudent thing to do
backpatched down to 12. Unless objections I'll do that.

--
Daniel Gustafsson





Fix a possible socket leak at Windows (src/backend/port/win32/socket.c)

2024-01-13 Thread Ranier Vilela
Hi.

While there are plans to remove the sockets functions (Windows) [1], I
believe it is worth fixing possible current bugs.

In the pgwin32_socket function (src/backend/port/win32/socket.c), there is
a possible socket leak if the socket cannot be made non-blocking.

Trivial patch attached.

Best regards,
Ranier Vilela

[1] Re: Windows sockets (select missing events?)



fix-socket-leak-windows.patch
Description: Binary data