Re: Fix a possible socket leak at Windows (src/backend/port/win32/socket.c)
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: Ranier Vilela <ranier.vf@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2024-01-15T12:43:03Z
Lists: pgsql-hackers
> On 13 Jan 2024, at 22:38, Ranier Vilela <ranier.vf@gmail.com> 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
Commits
-
Close socket in case of errors in setting non-blocking
- db0d238419de 12.18 landed
- d8f6ab5f66a3 14.11 landed
- a6463d287b4a 13.14 landed
- 7cfa154d15c4 17.0 landed
- 6614d38d8780 16.2 landed
- 551c0b7bda3e 15.6 landed