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: OpenSSL_1_0_1h~55 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f179e2b89928459dfbb6b56466b2a53169f8e83f;p=openssl PR#3342 fix resource leak coverity issue 966577 --- diff --git a/apps/s_socket.c b/apps/s_socket.c index 380efdb1b9..d49837a405 100644 --- a/apps/s_socket.c +++ b/apps/s_socket.c @@ -274,7 +274,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