Commit 9e72a6a7af512bb0e0209172066893ed00099854

Ran Benita 2012-05-22T08:04:59

Fix incorrect indexing while freeing 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 e782d57..ccdea78 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -508,7 +508,7 @@ XkbcFreeNames(struct xkb_keymap *keymap)
         for (i = 0; i < map->num_types; i++, type++) {
             int j;
             for (j = 0; j < type->num_levels; j++)
-                free(UNCONSTIFY(type->level_names[i]));
+                free(UNCONSTIFY(type->level_names[j]));
             free(type->level_names);
             type->level_names = NULL;
         }