Commit 9b14e0c311ca5f0ab7017e058fc9a34b0e5e04b2

Daniel Stone 2012-03-29T17:38:44

Tests: Release context on failure to build keymap No practical effect since they exit(1) regardless, but it keeps valgrind happy. Signed-off-by: Daniel Stone <daniel@fooishbar.org>

diff --git a/test/filecomp.c b/test/filecomp.c
index 3ba1b57..26bfaa6 100644
--- a/test/filecomp.c
+++ b/test/filecomp.c
@@ -85,6 +85,7 @@ int main(int argc, char *argv[])
 
     if (!xkb) {
         fprintf(stderr, "Failed to compile keymap\n");
+        xkb_context_unref(context);
         exit(1);
     }
 
diff --git a/test/namescomp.c b/test/namescomp.c
index 4e8bf5c..d16d375 100644
--- a/test/namescomp.c
+++ b/test/namescomp.c
@@ -57,6 +57,7 @@ int main(int argc, char *argv[])
 
     if (!xkb) {
         fprintf(stderr, "Failed to compile keymap\n");
+        xkb_context_unref(context);
         exit(1);
     }
 
diff --git a/test/rulescomp.c b/test/rulescomp.c
index a25b0a9..da9f619 100644
--- a/test/rulescomp.c
+++ b/test/rulescomp.c
@@ -58,6 +58,7 @@ int main(int argc, char *argv[])
 
     if (!xkb) {
         fprintf(stderr, "Failed to compile keymap\n");
+        xkb_context_unref(context);
         exit(1);
     }