diff options
author | marha <marha@users.sourceforge.net> | 2011-03-17 14:17:54 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-03-17 14:17:54 +0000 |
commit | 76b655664dad149451d0abaa15929d1b7b62e0c6 (patch) | |
tree | e7c3389fec52eaad405e2025e04555766493022c /xorg-server/xkb/ddxLoad.c | |
parent | a44b2f0d059871926ffb84dabdae53ddaa390beb (diff) | |
parent | d7f1bd4112420f1d4b41c5409074eca6b34bf507 (diff) | |
download | vcxsrv-76b655664dad149451d0abaa15929d1b7b62e0c6.tar.gz vcxsrv-76b655664dad149451d0abaa15929d1b7b62e0c6.tar.bz2 vcxsrv-76b655664dad149451d0abaa15929d1b7b62e0c6.zip |
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/xkb/ddxLoad.c')
-rw-r--r-- | xorg-server/xkb/ddxLoad.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/xorg-server/xkb/ddxLoad.c b/xorg-server/xkb/ddxLoad.c index 8b3dab56d..13d2d6f1b 100644 --- a/xorg-server/xkb/ddxLoad.c +++ b/xorg-server/xkb/ddxLoad.c @@ -451,23 +451,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;
}
|