Merge branch 'collectd-3.10'
[collectd.git] / src / apcups.c
index a9227ab..cd64426 100644 (file)
@@ -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);
        }