[PATCH] input: Don't leak the initial keymap
Rui Matos
tiagomatos at gmail.com
Thu Oct 24 19:28:41 CEST 2013
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 2fed718..da89b47 100644
--- a/src/input.c
+++ b/src/input.c
@@ -1706,6 +1706,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;
--
1.8.3.1
More information about the wayland-devel
mailing list