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 <daniels@collabora.com>
This commit is contained in:
Daniel Stone 2023-04-03 14:47:32 +01:00
parent 82dbb606a2
commit 27617ec937

View File

@ -524,7 +524,7 @@ drm_writeback_state_alloc(void)
static void static void
drm_writeback_state_free(struct drm_writeback_state *state) drm_writeback_state_free(struct drm_writeback_state *state)
{ {
struct drm_fb *fb; struct drm_fb **fb;
if (state->out_fence_fd >= 0) if (state->out_fence_fd >= 0)
close(state->out_fence_fd); 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 /* Unref framebuffers that were in use in the same commit of the one with
* the writeback setup */ * the writeback setup */
wl_array_for_each(fb, &state->referenced_fbs) wl_array_for_each(fb, &state->referenced_fbs)
drm_fb_unref(fb); drm_fb_unref(*fb);
wl_array_release(&state->referenced_fbs); wl_array_release(&state->referenced_fbs);
free(state); free(state);