Commit 3b22373f1fb554eb0ada419382381146238ce2ec

Ran Benita 2012-03-23T17:48:35

Properly free xkb_state's Signed-off-by: Ran Benita <ran234@gmail.com>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/src/state.c b/src/state.c
index ea5b390..52b2301 100644
--- a/src/state.c
+++ b/src/state.c
@@ -444,10 +444,11 @@ xkb_state_unref(struct xkb_state *state)
 {
     state->refcnt--;
     assert(state->refcnt >= 0);
-    if (state->refcnt == 0)
+    if (state->refcnt > 0)
         return;
 
     xkb_map_unref(state->xkb);
+    free(state->filters);
     free(state);
 }