diff options
Diffstat (limited to 'backend')
-rw-r--r-- | backend/drm/drm.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 74a63f79..60ac8e3e 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -782,11 +782,7 @@ void wlr_drm_scan_connectors(struct wlr_drm_backend *drm) { mode->wlr_mode.width, mode->wlr_mode.height, mode->wlr_mode.refresh); - if (list_add(wlr_conn->output.modes, mode) == -1) { - wlr_log_errno(L_ERROR, "Allocation failed"); - free(mode); - continue; - } + wl_list_insert(&wlr_conn->output.modes, &mode->wlr_mode.link); } wlr_conn->state = WLR_DRM_CONN_NEEDS_MODESET; |