Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7cfa154

Browse files
Close socket in case of errors in setting non-blocking
If configuring the newly created socket non-blocking fails weerror out and return INVALID_SOCKET, but the socket that hadbeen created wasn't closed. Fix by issuing closesocket in theerrorpath.Backpatch to all supported branches.Author: Ranier Vilela <ranier.vf@gmail.com>Discussion:https://postgr.es/m/CAEudQApmU5CrKefH85VbNYE2y8H=-qqEJbg6RAPU65+vCe+89A@mail.gmail.comBackpatch-through: v12
1 parent44ad512 commit7cfa154

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎src/backend/port/win32/socket.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ pgwin32_socket(int af, int type, int protocol)
303303
if (ioctlsocket(s,FIONBIO,&on))
304304
{
305305
TranslateSocketError();
306+
closesocket(s);
306307
returnINVALID_SOCKET;
307308
}
308309
errno=0;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp