aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/drm/backend.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/backend/drm/backend.c b/backend/drm/backend.c
index 26cd78e2..e6c709bf 100644
--- a/backend/drm/backend.c
+++ b/backend/drm/backend.c
@@ -41,11 +41,6 @@ static void backend_destroy(struct wlr_backend *backend) {
wlr_backend_finish(backend);
- struct wlr_drm_fb *fb, *fb_tmp;
- wl_list_for_each_safe(fb, fb_tmp, &drm->fbs, link) {
- drm_fb_destroy(fb);
- }
-
wl_list_remove(&drm->display_destroy.link);
wl_list_remove(&drm->session_destroy.link);
wl_list_remove(&drm->session_active.link);
@@ -59,6 +54,11 @@ static void backend_destroy(struct wlr_backend *backend) {
finish_drm_resources(drm);
+ struct wlr_drm_fb *fb, *fb_tmp;
+ wl_list_for_each_safe(fb, fb_tmp, &drm->fbs, link) {
+ drm_fb_destroy(fb);
+ }
+
free(drm->name);
wlr_session_close_file(drm->session, drm->dev);
wl_event_source_remove(drm->drm_event);