diff --git a/src/apcups.c b/src/apcups.c
index a9227ab29458d287d5d11018ee26dc600ea00fe3..cd64426afa01e42125f3b210b7e39dc40f991c12 100644 (file)
--- a/src/apcups.c
+++ b/src/apcups.c
if (status != 0) /* `connect(2)' failed */
{
DBG ("connect failed: %s", strerror (errno));
if (status != 0) /* `connect(2)' failed */
{
DBG ("connect failed: %s", strerror (errno));
+ close (sd);
return (-1);
}
return (-1);
}