aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2020-08-31 22:08:59 +0200
committerKenny Levinsen <kl@kl.wtf>2020-08-31 22:08:59 +0200
commitc9ce7c71aa80769033b556d1c486da81c2fda551 (patch)
treefb57946687c3746436ecddd03ceb4c323bfad9c2
parent704d1ccd0b9e0da1f3555a07ba9184927983f812 (diff)
poller: Remember to remove sources from list
-rw-r--r--seatd/poller.c2
1 files changed, 2 insertions, 0 deletions
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);