Fix a memleak Introduced in 38cb639082ec4b31725d4ce4e35af63938691631. Signed-off-by: Ran Benita <ran234@gmail.com>
diff --git a/src/alloc.c b/src/alloc.c
index 2d7025c..e782d57 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -346,7 +346,7 @@ XkbcFreeServerMap(struct xkb_keymap *keymap)
{
struct xkb_server_map * map;
- if (keymap || keymap->server)
+ if (!keymap || !keymap->server)
return;
map = keymap->server;