From 9b14e0c311ca5f0ab7017e058fc9a34b0e5e04b2 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Thu, 29 Mar 2012 17:38:44 +0100 Subject: [PATCH] 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 --- test/filecomp.c | 1 + test/namescomp.c | 1 + test/rulescomp.c | 1 + 3 files changed, 3 insertions(+) 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); } -- 2.7.4