compositor-drm: Zero drmModeAddFB2 data

Initialize arrays of data passed to drmModeAddFB2, just as
drm_fb_get_from_bo does.

See https://lists.freedesktop.org/archives/wayland-devel/2016-August/030645.html

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
dev
Yong Bakos 8 years ago committed by Quentin Glidic
parent eb07f3624d
commit 4b6321f49a
No known key found for this signature in database
GPG Key ID: AC203F96E2C34BB7
  1. 2
      libweston/compositor-drm.c

@ -319,7 +319,7 @@ drm_fb_create_dumb(struct drm_backend *b, unsigned width, unsigned height,
ret = -1;
if (!b->no_addfb2) {
uint32_t handles[4], pitches[4], offsets[4];
uint32_t handles[4] = { 0 }, pitches[4] = { 0 }, offsets[4] = { 0 };
handles[0] = fb->handle;
pitches[0] = fb->stride;

Loading…
Cancel
Save