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:
Peter Hutterer
2008-07-08 16:02:13 +09:30
parent db86b8839f
commit acce270935
4 changed files with 59 additions and 14 deletions

View File

@@ -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;