summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2001-09-05 10:37:48 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2001-09-05 10:37:48 +0000
commit6f0aecfecf7c065c1976c95273f8215df5c0fde7 (patch)
treeeda10e4db6c10f3561b2de3390964e784ad0a372
parent62107e2b963a39e30d7abf9fa881d54f83c7b9ab (diff)
downloadzabbix-6f0aecfecf7c065c1976c95273f8215df5c0fde7.tar.gz
zabbix-6f0aecfecf7c065c1976c95273f8215df5c0fde7.tar.xz
zabbix-6f0aecfecf7c065c1976c95273f8215df5c0fde7.zip
Small fix.
git-svn-id: svn://svn.zabbix.com/trunk@198 97f52cf1-0a1b-0410-bd0e-c28be96e8082
-rw-r--r--src/zabbix_agent/sysinfo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/zabbix_agent/sysinfo.c b/src/zabbix_agent/sysinfo.c
index 6efdbce3..c634d9cb 100644
--- a/src/zabbix_agent/sysinfo.c
+++ b/src/zabbix_agent/sysinfo.c
@@ -782,11 +782,13 @@ float tcp_expect(char *hostname, short port, char *expect,char *sendtoclose)
s = socket(AF_INET, SOCK_STREAM, 0);
if (s == -1)
{
+ close(s);
return 0;
}
if (connect(s, (struct sockaddr *) &addr, addrlen) == -1)
{
+ close(s);
return 0;
}