diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-02-08 11:24:09 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-02-08 11:24:09 +0000 |
| commit | 274e5ce5af542ba99fe89d458c8bbbb3f1e9a868 (patch) | |
| tree | 58bc014c759d125b9c143283c5502219013e5f77 /wayland.c | |
| parent | Merge branch 'url-detection' (diff) | |
| parent | misc: when free:ing tll lists, prefer tll_remove() over tll_free() (diff) | |
Merge branch 'prefer-tll_remove-over-tll_free'
Diffstat (limited to 'wayland.c')
| -rw-r--r-- | wayland.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1240,13 +1240,15 @@ wayl_destroy(struct wayland *wayl) fdm_hook_del(wayl->fdm, &fdm_hook, FDM_HOOK_PRIORITY_LOW); - tll_foreach(wayl->monitors, it) + tll_foreach(wayl->monitors, it) { monitor_destroy(&it->item); - tll_free(wayl->monitors); + tll_remove(wayl->monitors, it); + } - tll_foreach(wayl->seats, it) + tll_foreach(wayl->seats, it) { seat_destroy(&it->item); - tll_free(wayl->seats); + tll_remove(wayl->seats, it); + } #if defined(FOOT_IME_ENABLED) && FOOT_IME_ENABLED if (wayl->text_input_manager != NULL) @@ -1431,8 +1433,8 @@ wayl_win_destroy(struct wl_window *win) wl_subsurface_destroy(it->item.sub_surf); if (it->item.surf != NULL) wl_surface_destroy(it->item.surf); + tll_remove(win->urls, it); } - tll_free(win->urls); csd_destroy(win); if (win->render_timer_sub_surface != NULL) |
