From 73d9395e68b955b537452e8b9107d2e55cf455c3 Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Thu, 24 Oct 2013 19:28:41 +0200 Subject: [PATCH] input: Don't leak the initial keymap weston_xkb_info_create() takes ownership of the xkb_keymap instance so we should drop our reference or we would leak it later if the keymap was changed. --- src/input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/input.c b/src/input.c index 07e9d6cb..902cfb8f 100644 --- a/src/input.c +++ b/src/input.c @@ -1954,6 +1954,7 @@ weston_compositor_build_global_keymap(struct weston_compositor *ec) } ec->xkb_info = weston_xkb_info_create(keymap); + xkb_keymap_unref(keymap); if (ec->xkb_info == NULL) return -1;