Xext: store the GenericMasks in the resource system.
This fixes a severe issue - when the client died the event mask didn't get unregistered and a future event would dereference dangling pointers. By storing the event masks in the resource system we can free them when the client dies.
This commit is contained in:
@@ -175,7 +175,7 @@ ProcXExtendedGrabDevice(ClientPtr client)
|
||||
(XGenericEventMask*)(((XEventClass*)&stuff[1]) + stuff->event_count);
|
||||
|
||||
gemasks = xcalloc(1, sizeof(GenericMaskRec));
|
||||
gemasks->client = client;
|
||||
gemasks->resource = FakeClientID(client->index);
|
||||
gemasks->next = NULL;
|
||||
gemasks->eventMask[xgeMask->extension & 0x7F] = xgeMask->evmask;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user