diff options
Diffstat (limited to 'common/loop.c')
-rw-r--r-- | common/loop.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/common/loop.c b/common/loop.c index 82b80017..295f3a30 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); + list_free_items_and_destroy(loop->fd_events); + list_free_items_and_destroy(loop->timers); free(loop->fds); free(loop); } |