diff options
Diffstat (limited to 'xkb')
-rw-r--r-- | xkb/xkb.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -224,7 +224,8 @@ ProcXkbSelectEvents(ClientPtr client) masks = XkbFindClientResource((DevicePtr)dev,client); if (!masks){ XID id = FakeClientID(client->index); - AddResource(id,RT_XKBCLIENT,dev); + if (!AddResource(id,RT_XKBCLIENT,dev)) + return BadAlloc; masks= XkbAddClientResource((DevicePtr)dev,client,id); } if (masks) { @@ -5378,7 +5379,8 @@ ProcXkbPerClientFlags(ClientPtr client) } else if (want && (!interest)) { XID id = FakeClientID(client->index); - AddResource(id,RT_XKBCLIENT,dev); + if (!AddResource(id,RT_XKBCLIENT,dev)) + return BadAlloc; interest= XkbAddClientResource((DevicePtr)dev,client,id); if (!interest) return BadAlloc; |