summaryrefslogtreecommitdiffstats
path: root/apps/s_socket.c
diff options
context:
space:
mode:
authorTim Hudson <tjh@cryptsoft.com>2014-05-05 10:39:30 +1000
committerMatt Caswell <matt@openssl.org>2014-05-08 23:18:44 +0100
commitf179e2b89928459dfbb6b56466b2a53169f8e83f (patch)
treec18c90d415854e21d329cb7e6f25651eee77733a /apps/s_socket.c
parent6a60b414318ec4315ee016c3e15777c448603115 (diff)
PR#3342 fix resource leak coverity issue 966577
Diffstat (limited to 'apps/s_socket.c')
-rw-r--r--apps/s_socket.c2
1 files changed, 1 insertions, 1 deletions
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