Fix Coverity Scan CID 60357 (Handle variable sfd going out of scope leaks the handle.)

This commit is contained in:
Dong Anyuan
2019-06-20 12:36:38 +09:00
parent 42f481b51e
commit 1338654285
+2
View File
@@ -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;