From 59524cd062f87874f11d566a32836a97e8426382 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 18 Jul 2018 22:16:48 +0200 Subject: Keyboard.c: simplify even more: free stuff at one place --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent') 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 -- cgit v1.2.3