summaryrefslogtreecommitdiffstats
path: root/src/egl/wayland
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/wayland')
-rw-r--r--src/egl/wayland/wayland-drm/wayland-drm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/egl/wayland/wayland-drm/wayland-drm.c b/src/egl/wayland/wayland-drm/wayland-drm.c
index 6cc442b9d53..3023cd02b07 100644
--- a/src/egl/wayland/wayland-drm/wayland-drm.c
+++ b/src/egl/wayland/wayland-drm/wayland-drm.c
@@ -88,17 +88,17 @@ drm_create_buffer(struct wl_client *client, struct wl_drm *drm,
{
struct wl_drm_buffer *buffer;
- buffer = malloc(sizeof *buffer);
+ buffer = calloc(1, sizeof *buffer);
if (buffer == NULL) {
wl_client_post_no_memory(client);
return;
}
buffer->drm = drm;
- buffer->buffer.compositor = NULL;
buffer->buffer.width = width;
buffer->buffer.height = height;
buffer->buffer.visual = visual;
+ buffer->buffer.client = client;
if (!visual || visual->object.interface != &wl_visual_interface) {
wl_client_post_error(client, &drm->object,