PR#3342 fix resource leak coverity issue 966577
This commit is contained in:
parent
1535ff91e1
commit
51080676f1
@ -275,7 +275,7 @@ static int init_client_ip(int *sock, unsigned char ip[4], int port, int type)
|
||||
{
|
||||
i=0;
|
||||
i=setsockopt(s,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i));
|
||||
if (i < 0) { perror("keepalive"); return(0); }
|
||||
if (i < 0) { closesocket(s); perror("keepalive"); return(0); }
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user