Fix Coverity Scan CID 60357 (Handle variable sfd going out of scope leaks the handle.)
This commit is contained in:
@@ -221,6 +221,8 @@ void* socket_udp_open(int type, const char* host, const char* port)
|
||||
sid->type = type;
|
||||
sid->port = atoi (port);
|
||||
sid->fd = sfd;
|
||||
} else {
|
||||
close (sfd);
|
||||
}
|
||||
|
||||
return sid;
|
||||
|
||||
Reference in New Issue
Block a user