[PATCH] input: Don't leak the initial keymap
Kristian Høgsberg
hoegsberg at gmail.com
Wed Jan 8 21:41:01 PST 2014
On Thu, Oct 24, 2013 at 07:28:41PM +0200, Rui Matos wrote:
> 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.
Thanks again for the reminder, applied.
Kristian
> ---
> 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
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list