From: Tim Hudson Date: Mon, 5 May 2014 00:39:30 +0000 (+1000) Subject: PR#3342 fix resource leak coverity issue 966577 X-Git-Tag: master-post-reformat~828 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8e94fadd0b79491714401d89b338db27211b9819;p=oweals%2Fopenssl.git PR#3342 fix resource leak coverity issue 966577 --- diff --git a/apps/s_socket.c b/apps/s_socket.c index e0dbc5a90a..1841607ef5 100644 --- a/apps/s_socket.c +++ b/apps/s_socket.c @@ -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