From c9ce7c71aa80769033b556d1c486da81c2fda551 Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Mon, 31 Aug 2020 22:08:59 +0200 Subject: poller: Remember to remove sources from list --- seatd/poller.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'seatd/poller.c') diff --git a/seatd/poller.c b/seatd/poller.c index 74d5d89..53831e4 100644 --- a/seatd/poller.c +++ b/seatd/poller.c @@ -55,6 +55,7 @@ void poller_init(struct poller *poller) { int poller_finish(struct poller *poller) { while (!linked_list_empty(&poller->fds)) { struct event_source_fd *bpfd = (struct event_source_fd *)poller->fds.next; + linked_list_remove(&bpfd->link); free(bpfd); } while (!linked_list_empty(&poller->signals)) { @@ -66,6 +67,7 @@ int poller_finish(struct poller *poller) { sa.sa_flags = 0; sigaction(bps->signal, &sa, NULL); + linked_list_remove(&bps->link); free(bps); } free(poller->pollfds); -- cgit v1.2.3