aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2018-07-18 22:16:48 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-11-09 15:31:57 +0100
commit59524cd062f87874f11d566a32836a97e8426382 (patch)
tree92fc37f31785578028ec93df8e433ff7a6c56f22 /nx-X11/programs/Xserver/hw
parentb8ae794e47cf2e23f7391856865d4e06c7a61fd1 (diff)
downloadnx-libs-59524cd062f87874f11d566a32836a97e8426382.tar.gz
nx-libs-59524cd062f87874f11d566a32836a97e8426382.tar.bz2
nx-libs-59524cd062f87874f11d566a32836a97e8426382.zip
Keyboard.c: simplify even more: free stuff at one place
Diffstat (limited to 'nx-X11/programs/Xserver/hw')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keyboard.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
index eea09a436..c2c36ad23 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
@@ -723,14 +723,6 @@ XkbError:
fprintf(stderr, "nxagentKeyboardProc: XKB error.\n");
#endif
- if (xkb)
- {
- XkbFreeKeyboard(xkb, XkbAllComponentsMask, True);
- xkb = NULL;
- }
-
- free(model);
- free(layout);
#endif
XGetKeyboardControl(nxagentDisplay, &values);
@@ -863,16 +855,16 @@ XkbError:
{
NXShadowInitKeymap(&(pDev->key->curKeySyms));
}
+ }
- if (xkb)
- {
- XkbFreeKeyboard(xkb, XkbAllComponentsMask, True);
- xkb = NULL;
- }
-
- free(model);
- free(layout);
+ if (xkb)
+ {
+ XkbFreeKeyboard(xkb, XkbAllComponentsMask, True);
+ xkb = NULL;
}
+
+ free(model);
+ free(layout);
#endif
#ifdef WATCH