提交 8e94fadd 编写于 作者: T Tim Hudson 提交者: Matt Caswell

PR#3342 fix resource leak coverity issue 966577

上级 630f9fc6
......@@ -270,7 +270,7 @@ static int init_client_ip(int *sock, const unsigned char ip[4], int port,
{
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册