windows: Close correct socket when opening second socket fails in socketpair()
This commit is contained in:
1 parent
0a26f39a71
commit
babe9e4f45
1 file changed
+1
-1
@@ -221,7 +221,7 @@ int socketpair(int domain, int type, int protocol, int sv[2])
|
||||
c = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
|
||||
if (c == -1)
|
||||
{
|
||||
closesocket(c);
|
||||
closesocket(s);
|
||||
return -1;
|
||||
}
|
||||
if (bind(s, (struct sockaddr*)&addr, sizeof(addr)) == 0 &&
|
||||
|
||||
Reference in new issue
Block a user