windows: Close correct socket when opening second socket fails in socketpair()

This commit is contained in:
Tobias Brunner
2014-07-02 12:38:44 +02:00
parent 0a26f39a71
commit babe9e4f45
+1 -1
View File
@@ -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 &&