From c3c0b247a05da46eb032320f38428767acc26910 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 20 Jun 2019 22:54:54 +0200 Subject: [PATCH] backend-rdp: unref keymap after associating with seat The function weston_seat_init_keyboard makes sure that it has its own reference to keymap, hence we can safely drop our reference. This is similarly done in the X11 backend. It avoids leaking a struct xkb_keymap per connection. Signed-off-by: Stefan Agner --- libweston/backend-rdp/rdp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libweston/backend-rdp/rdp.c b/libweston/backend-rdp/rdp.c index 6aec15d2..ce91cedd 100644 --- a/libweston/backend-rdp/rdp.c +++ b/libweston/backend-rdp/rdp.c @@ -1064,6 +1064,7 @@ xf_peer_activate(freerdp_peer* client) weston_seat_init(peersItem->seat, b->compositor, seat_name); weston_seat_init_keyboard(peersItem->seat, keymap); + xkb_keymap_unref(keymap); weston_seat_init_pointer(peersItem->seat); peersItem->flags |= RDP_PEER_ACTIVATED; -- 2.34.1