aboutsummaryrefslogtreecommitdiff
path: root/common/loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/loop.c')
-rw-r--r--common/loop.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/common/loop.c b/common/loop.c
index 82b80017..ad2b4a64 100644
--- a/common/loop.c
+++ b/common/loop.c
@@ -45,10 +45,8 @@ struct loop *loop_create(void) {
}
void loop_destroy(struct loop *loop) {
- list_foreach(loop->fd_events, free);
- list_foreach(loop->timers, free);
- list_free(loop->fd_events);
- list_free(loop->timers);
+ free_flat_list(loop->fd_events);
+ free_flat_list(loop->timers);
free(loop->fds);
free(loop);
}