@@ -, +, @@ +thockin@hockin.org wrote: +> On Fri, Sep 23, 2005 at 11:54:43AM +0200, Timo Hoenig wrote: +>> Nevertheless I'm sending you a patch to close a client's fd once it +>> disconnects. Otherwise acpid leaks one fd for each client +>> disconnecting. +> +> It also seems to leak the rule structure. Woops. + +If you fix it, it would be nice if you pass the patch on to me :-) Index: event.c =================================================================== RCS file: /cvsroot/acpid/acpid/event.c,v --- event.c 25 Oct 2004 04:24:21 -0000 1.9 +++ event.c 23 Sep 2005 16:17:15 -0000 @@ -590,6 +590,8 @@ /* closed */ acpid_log("client has disconnected\n"); delist_rule(&client_list, rule); + close(rule->action.fd); + free_rule(rule); return -1; } safe_write(client, "\n", 1);