NetEndpoint: Don't forget to close socket in error case. CID 1162792

This commit is contained in:
Stephan Aßmus 2014-01-22 17:36:25 +01:00
parent dae0b385cf
commit 840aeab5b9

View File

@ -454,6 +454,7 @@ BNetEndpoint::Accept(int32 timeout)
socklen_t localAddressSize = sizeof(localAddress);
if (getsockname(socket, (struct sockaddr *)&localAddress,
&localAddressSize) < 0) {
close(socket);
fStatus = errno;
return NULL;
}