From 27617ec9379f75b5e6156e8e90be98dde94714f4 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Mon, 3 Apr 2023 14:47:32 +0100 Subject: [PATCH] drm: Fix type confusion in writeback_state wl_array_for_each() returns a pointer to each storage location; as we're storing a pointer to drm_fb, this means that we have a drm_fb **, not a drm_fb *. Signed-off-by: Daniel Stone --- libweston/backend-drm/drm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c index f2530856..5b6ade46 100644 --- a/libweston/backend-drm/drm.c +++ b/libweston/backend-drm/drm.c @@ -524,7 +524,7 @@ drm_writeback_state_alloc(void) static void drm_writeback_state_free(struct drm_writeback_state *state) { - struct drm_fb *fb; + struct drm_fb **fb; if (state->out_fence_fd >= 0) close(state->out_fence_fd); @@ -536,7 +536,7 @@ drm_writeback_state_free(struct drm_writeback_state *state) /* Unref framebuffers that were in use in the same commit of the one with * the writeback setup */ wl_array_for_each(fb, &state->referenced_fbs) - drm_fb_unref(fb); + drm_fb_unref(*fb); wl_array_release(&state->referenced_fbs); free(state);