summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-08-11 14:40:57 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2010-08-11 14:40:57 +0200
commit4bf834bad6640b5670959ce0c21557bf5923bb2b (patch)
tree6e43b5bcbd98f98d16291f2560f0df51010898bd
parente7d4ec890b42ceb0ab9bb4ee5ecc9a9e489c7388 (diff)
downloadrsyslog-4bf834bad6640b5670959ce0c21557bf5923bb2b.tar.gz
rsyslog-4bf834bad6640b5670959ce0c21557bf5923bb2b.tar.xz
rsyslog-4bf834bad6640b5670959ce0c21557bf5923bb2b.zip
fixed minor issue: imptcp did a close(-1) on each accept
-rw-r--r--plugins/imptcp/imptcp.c3
1 files changed, 2 insertions, 1 deletions
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;