Fix a possible socket leak at Windows (src/backend/port/win32/socket.c) - Mailing list pgsql-hackers

From Ranier Vilela
Subject Fix a possible socket leak at Windows (src/backend/port/win32/socket.c)
Date
Msg-id CAEudQApmU5CrKefH85VbNYE2y8H=-qqEJbg6RAPU65+vCe+89A@mail.gmail.com
Whole thread Raw
Responses Re: Fix a possible socket leak at Windows (src/backend/port/win32/socket.c)
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: reorganize "Shared Memory and LWLocks" section of docs
Next
From: Nathan Bossart
Date:
Subject: Re: introduce dynamic shared memory registry