aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xkb/ddxLoad.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-17 13:49:22 +0000
committermarha <marha@users.sourceforge.net>2011-03-17 13:49:22 +0000
commitd7f1bd4112420f1d4b41c5409074eca6b34bf507 (patch)
treee3673d73657946b3122f5ff05bf19dff5ddeaff6 /xorg-server/xkb/ddxLoad.c
parent5e633abcca598289d0423d89bb400b41e6417259 (diff)
downloadvcxsrv-d7f1bd4112420f1d4b41c5409074eca6b34bf507.tar.gz
vcxsrv-d7f1bd4112420f1d4b41c5409074eca6b34bf507.tar.bz2
vcxsrv-d7f1bd4112420f1d4b41c5409074eca6b34bf507.zip
xserver libX11 mesa git updaet 17 Mar 2011
Diffstat (limited to 'xorg-server/xkb/ddxLoad.c')
-rw-r--r--xorg-server/xkb/ddxLoad.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/xorg-server/xkb/ddxLoad.c b/xorg-server/xkb/ddxLoad.c
index dc3c844c9..e1020358a 100644
--- a/xorg-server/xkb/ddxLoad.c
+++ b/xorg-server/xkb/ddxLoad.c
@@ -447,23 +447,23 @@ XkbRMLVOtoKcCGST(DeviceIntPtr dev, XkbRMLVOSet *rmlvo, XkbComponentNamesPtr kccg
static XkbDescPtr
XkbCompileKeymapForDevice(DeviceIntPtr dev, XkbRMLVOSet *rmlvo, int need)
{
- XkbDescPtr xkb;
+ XkbDescPtr xkb = NULL;
unsigned int provided;
- XkbComponentNamesRec kccgst;
+ XkbComponentNamesRec kccgst = {0};
char name[PATH_MAX];
- if (!XkbRMLVOtoKcCGST(dev, rmlvo, &kccgst))
- return NULL;
-
- provided = XkbDDXLoadKeymapByNames(dev, &kccgst, XkmAllIndicesMask, need,
- &xkb, name, PATH_MAX);
- if ((need & provided) != need) {
- if (xkb) {
- XkbFreeKeyboard(xkb, 0, TRUE);
- xkb = NULL;
+ if (XkbRMLVOtoKcCGST(dev, rmlvo, &kccgst)) {
+ provided = XkbDDXLoadKeymapByNames(dev, &kccgst, XkmAllIndicesMask, need,
+ &xkb, name, PATH_MAX);
+ if ((need & provided) != need) {
+ if (xkb) {
+ XkbFreeKeyboard(xkb, 0, TRUE);
+ xkb = NULL;
+ }
}
}
+ XkbFreeComponentNames(&kccgst, FALSE);
return xkb;
}