From 97aded721dd0bf33a56839517921e4c7094c90d7 Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Sun, 26 Jun 2022 22:55:32 +0100 Subject: Fix some minor memory error typos. --- src/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 920e6a6..d6f6d88 100644 --- a/src/main.c +++ b/src/main.c @@ -1099,7 +1099,9 @@ int main(int argc, char *argv[]) wl_seat_release(tofi.wl_seat); { struct output_list_element *el; - wl_list_for_each(el, &tofi.output_list, link) { + struct output_list_element *tmp; + wl_list_for_each_safe(el, tmp, &tofi.output_list, link) { + wl_list_remove(&el->link); wl_output_release(el->wl_output); free(el->name); free(el); -- cgit v1.2.3