diff options
Diffstat (limited to 'nx-X11/lib/X11/KeyBind.c')
-rw-r--r-- | nx-X11/lib/X11/KeyBind.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/nx-X11/lib/X11/KeyBind.c b/nx-X11/lib/X11/KeyBind.c index deb200786..acaf7fd8f 100644 --- a/nx-X11/lib/X11/KeyBind.c +++ b/nx-X11/lib/X11/KeyBind.c @@ -271,12 +271,13 @@ _XKeyInitialize( if (! keysyms) return 0; LockDisplay(dpy); - if (dpy->keysyms) - Xfree (dpy->keysyms); + + Xfree (dpy->keysyms); dpy->keysyms = keysyms; dpy->keysyms_per_keycode = per; if (dpy->modifiermap) ResetModMap(dpy); + UnlockDisplay(dpy); } if (!dpy->modifiermap) @@ -929,8 +930,8 @@ XRebindKeysym ( ((! (p->string = Xmalloc(nbytes))) && (nbytes > 0)) || ((! (p->modifiers = Xmalloc(nb))) && (nb > 0))) { if (p) { - if (p->string) Xfree(p->string); - if (p->modifiers) Xfree(p->modifiers); + Xfree(p->string); + Xfree(p->modifiers); Xfree(p); } UnlockDisplay(dpy); |