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

Commitd8f6ab5

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 parent7a7c8c9 commitd8f6ab5

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
@@ -298,6 +298,7 @@ pgwin32_socket(int af, int type, int protocol)
298298
if (ioctlsocket(s,FIONBIO,&on))
299299
{
300300
TranslateSocketError();
301+
closesocket(s);
301302
returnINVALID_SOCKET;
302303
}
303304
errno=0;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp