1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-26 12:27:52 +00:00

Fix an FD leak in APCUPSD.

In some cases the socket FD may have not been closed in the APCUPSD
update function.

This fixes #725.
This commit is contained in:
Brenden Matthews 2018-12-28 13:10:11 -05:00
parent e0209632d1
commit edb7f84ecd

View File

@ -234,10 +234,8 @@ int update_apcupsd() {
// //
// read the lines of output and put them into the info structure // read the lines of output and put them into the info structure
// //
if (fill_items(sock, &apc) == 0) { fill_items(sock, &apc);
close(sock); close(sock);
break;
}
} while (0); } while (0);