backend-rdp: release seat on peer disconnect

Properly release the seat on RDP disconnect. Using current master
branch which is commit d93c0f7059 ("backend-rdp: fix memory leak")
I was not able to reproduce the crash on reconnect as mentioned in the
current comment. Using Weston with rdp-backend directly as well as
using the screen-share plug-in allowed to reconnect just fine. Hence
release the Weston seat properly using weston_seat_release and free
the seat structure. This also avoids mouse pointers displayed for
every RDP connection.

Signed-off-by: Stefan Agner <stefan@agner.ch>
dev
Stefan Agner 6 years ago committed by Pekka Paalanen
parent e3f447eee8
commit 7d2da94b05
  1. 4
      libweston/backend-rdp/rdp.c

@ -715,8 +715,8 @@ rdp_peer_context_free(freerdp_peer* client, RdpPeerContext* context)
if (context->item.flags & RDP_PEER_ACTIVATED) {
weston_seat_release_keyboard(context->item.seat);
weston_seat_release_pointer(context->item.seat);
/* XXX we should weston_seat_release(context->item.seat); here
* but it would crash on reconnect */
weston_seat_release(context->item.seat);
free(context->item.seat);
}
Stream_Free(context->encode_stream, TRUE);

Loading…
Cancel
Save