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:
parent
e0209632d1
commit
edb7f84ecd
@ -234,10 +234,8 @@ int update_apcupsd() {
|
||||
//
|
||||
// read the lines of output and put them into the info structure
|
||||
//
|
||||
if (fill_items(sock, &apc) == 0) {
|
||||
close(sock);
|
||||
break;
|
||||
}
|
||||
fill_items(sock, &apc);
|
||||
close(sock);
|
||||
|
||||
} while (0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user