fix a file descriptor leak
authorFelix Fietkau <nbd@openwrt.org>
Sun, 13 May 2012 09:17:49 +0000 (11:17 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 13 May 2012 09:17:49 +0000 (11:17 +0200)
main.c

diff --git a/main.c b/main.c
index 6bd521a34b8fa5e5a4232c1b4ad211c3529af6b7..4ee86ebe642530ef2f6d605e10bc000eb38e224b 100644 (file)
--- a/main.c
+++ b/main.c
@@ -59,6 +59,7 @@ netifd_delete_process(struct netifd_process *proc)
                uloop_process_delete(&proc->uloop);
        list_del(&proc->list);
        netifd_fd_delete(&proc->log_fd);
+       close(proc->log_fd.fd);
        if (proc->log_buf) {
                free(proc->log_buf);
                proc->log_buf = NULL;