diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2013-08-21 22:14:14 -0700 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-08-22 10:11:03 -0700 |
commit | 122a93850784e5fe14a66753f5e3e5b3d92c3d85 (patch) | |
tree | e65ea25270183efe9ba419cde99bc1057c98cd92 | |
parent | db8c5c89707c71a2498495bd18b2058b74f9ea45 (diff) | |
download | weston-122a93850784e5fe14a66753f5e3e5b3d92c3d85.tar.gz weston-122a93850784e5fe14a66753f5e3e5b3d92c3d85.tar.bz2 weston-122a93850784e5fe14a66753f5e3e5b3d92c3d85.zip |
compositor-drm: Zero out create_arg when creating dumb framebuffers
The create_arg struct has a flags member that we didn't properly set to 0.
-rw-r--r-- | src/compositor-drm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 88b87f81..0600ceba 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -238,6 +238,7 @@ drm_fb_create_dumb(struct drm_compositor *ec, unsigned width, unsigned height) if (!fb) return NULL; + memset(&create_arg, 0, sizeof create_arg); create_arg.bpp = 32; create_arg.width = width; create_arg.height = height; @@ -256,7 +257,7 @@ drm_fb_create_dumb(struct drm_compositor *ec, unsigned width, unsigned height) if (ret) goto err_bo; - memset(&map_arg, 0, sizeof(map_arg)); + memset(&map_arg, 0, sizeof map_arg); map_arg.handle = fb->handle; ret = drmIoctl(fb->fd, DRM_IOCTL_MODE_MAP_DUMB, &map_arg); if (ret) |