backend-drm: Free scanout format table after use

We were deinitialising the array, but not also freeing the allocation.

Signed-off-by: Daniel Stone <daniels@collabora.com>
dev
Daniel Stone 3 years ago
parent 61851f5c37
commit f508603420
  1. 2
      libweston/backend-drm/drm.c

@ -1725,6 +1725,7 @@ get_scanout_formats(struct drm_backend *b)
err:
weston_drm_format_array_fini(&union_planes_formats);
weston_drm_format_array_fini(scanout_formats);
free(scanout_formats);
return NULL;
}
@ -3154,6 +3155,7 @@ drm_backend_create(struct weston_compositor *compositor,
ret = weston_dmabuf_feedback_format_table_set_scanout_indices(compositor->dmabuf_feedback_format_table,
scanout_formats);
weston_drm_format_array_fini(scanout_formats);
free(scanout_formats);
if (ret < 0)
goto err_udev_monitor;
}

Loading…
Cancel
Save