X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fapcups.c;h=cd64426afa01e42125f3b210b7e39dc40f991c12;hb=4c3b690f915df7b56170cee189096949adedefe5;hp=a9227ab29458d287d5d11018ee26dc600ea00fe3;hpb=02ef3090232f10a86e8f52597e42495a468bb3c5;p=collectd.git diff --git a/src/apcups.c b/src/apcups.c index a9227ab2..cd64426a 100644 --- a/src/apcups.c +++ b/src/apcups.c @@ -208,6 +208,7 @@ static int net_open (char *host, char *service, int port) if (status != 0) /* `connect(2)' failed */ { DBG ("connect failed: %s", strerror (errno)); + close (sd); return (-1); }