From: Stefan Agner Date: Thu, 20 Jun 2019 20:54:54 +0000 (+0200) Subject: backend-rdp: unref keymap after associating with seat X-Git-Tag: upstream/9.0.0~191 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c3c0b247a05da46eb032320f38428767acc26910;p=platform%2Fupstream%2Fweston.git 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 --- 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;