From 4bf834bad6640b5670959ce0c21557bf5923bb2b Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 11 Aug 2010 14:40:57 +0200 Subject: fixed minor issue: imptcp did a close(-1) on each accept --- plugins/imptcp/imptcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/imptcp/imptcp.c b/plugins/imptcp/imptcp.c index 2bceffad..975d3e89 100644 --- a/plugins/imptcp/imptcp.c +++ b/plugins/imptcp/imptcp.c @@ -458,7 +458,8 @@ AcceptConnReq(int sock, int *newSock, prop_t **peerName, prop_t **peerIP) finalize_it: if(iRet != RS_RET_OK) { /* the close may be redundant, but that doesn't hurt... */ - close(iNewSock); + if(iNewSock != -1) + close(iNewSock); } RETiRet; -- cgit