aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xkb/xkb.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-09-11 09:26:35 +0000
committermarha <marha@users.sourceforge.net>2010-09-11 09:26:35 +0000
commit35b29c19707341bbfa32f7f6136ce09e59cb332c (patch)
treea795242657a2b96a463a11774517472fa4c64953 /xorg-server/xkb/xkb.c
parentba6498fea6d935aff0856f9851cb47d5657952fa (diff)
parente172c89783326e2378e4793ff31a0f44210c5534 (diff)
downloadvcxsrv-35b29c19707341bbfa32f7f6136ce09e59cb332c.tar.gz
vcxsrv-35b29c19707341bbfa32f7f6136ce09e59cb332c.tar.bz2
vcxsrv-35b29c19707341bbfa32f7f6136ce09e59cb332c.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/xkb/xkb.c')
-rw-r--r--xorg-server/xkb/xkb.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xorg-server/xkb/xkb.c b/xorg-server/xkb/xkb.c
index bba7448f3..89139dc43 100644
--- a/xorg-server/xkb/xkb.c
+++ b/xorg-server/xkb/xkb.c
@@ -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) {
@@ -3019,6 +3020,7 @@ register unsigned bit;
to = (CARD8 *)wire;
if ((to-map)!=length) {
client->errorValue = _XkbErrCode2(0xff,length);
+ free(map);
return BadLength;
}
}
@@ -5377,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;