From 1b7191743eeeecedd66af03eeb960c5978fc8335 Mon Sep 17 00:00:00 2001 From: Marek Chalupa Date: Mon, 11 Jan 2016 11:45:12 +0100 Subject: [PATCH] server: don't send an error to NULL display_resource if display_resource = wl_resource_create() fails in bind_display(), we call wl_client_post_no_memory() which is wrong, since this function uses display_resource (which is NULL at this point). said simply: don't send an error to resource that you've just failed to create) https://bugs.freedesktop.org/show_bug.cgi?id=91356 Reported-by: Ashim Signed-off-by: Marek Chalupa Reviewed-by: Derek Foreman Reviewed-by: Bryce Harrington --- src/wayland-server.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wayland-server.c b/src/wayland-server.c index 2158c088..2cfbb4a3 100644 --- a/src/wayland-server.c +++ b/src/wayland-server.c @@ -779,7 +779,8 @@ bind_display(struct wl_client *client, struct wl_display *display) client->display_resource = wl_resource_create(client, &wl_display_interface, 1, 1); if (client->display_resource == NULL) { - wl_client_post_no_memory(client); + /* DON'T send no-memory error to client - it has no + * resource to which it could post the event */ return -1; }