Commit 64ca14b8 authored by Olivier Fourdan's avatar Olivier Fourdan Committed by Adam Jackson

xwayland: make sure client is not gone in sync callback

in XWayland, dri3_send_open_reply() is called from a sync callback, so
there is a possibility that the client might be gone when we get to the
callback eventually, which leads to a crash in _XSERVTransSendFd() from
WriteFdToClient() .

Check if clientGone has been set in the sync callback handler to avoid
this.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99149
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100040
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1416553Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
Tested-by: Mark Blakeney's avatarMark B <mark.blakeney@bullet-systems.net>
parent 5c44169c
......@@ -435,9 +435,12 @@ static void
sync_callback(void *data, struct wl_callback *callback, uint32_t serial)
{
struct xwl_auth_state *state = data;
ClientPtr client = state->client;
dri3_send_open_reply(state->client, state->fd);
AttendClient(state->client);
if (!client->clientGone) {
dri3_send_open_reply(client, state->fd);
AttendClient(client);
}
free(state);
wl_callback_destroy(callback);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment