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.
This commit is contained in:
Rui Matos 2013-10-24 19:28:41 +02:00 committed by Kristian Høgsberg
parent b0420aeb3d
commit 73d9395e68

View file

@ -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;