NetEndpoint: Don't forget to close socket in error case. CID 1162792
This commit is contained in:
parent
dae0b385cf
commit
840aeab5b9
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user