Commit b571b8345928056aaf172d01a9f8c0aa84e484cf

Ran Benita 2012-05-13T10:38:51

Fix a memleak Introduced in 38cb639082ec4b31725d4ce4e35af63938691631. Signed-off-by: Ran Benita <ran234@gmail.com>

1
2
3
4
5
6
7
8
9
10
11
12
13
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;