From 2f58469f1b4a447bfdafce56c838d7323fb9c256 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Fri, 4 Mar 2016 16:03:09 -0800 Subject: [PATCH] GUAC-1389: Do not attempt to free RDP client until client thread finishes. --- src/protocols/rdp/client.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/protocols/rdp/client.c b/src/protocols/rdp/client.c index 65f28620..940635f5 100644 --- a/src/protocols/rdp/client.c +++ b/src/protocols/rdp/client.c @@ -95,6 +95,9 @@ int guac_rdp_client_free_handler(guac_client* client) { guac_rdp_client* rdp_client = (guac_rdp_client*) client->data; + /* Wait for client thread */ + pthread_join(rdp_client->client_thread, NULL); + freerdp* rdp_inst = rdp_client->rdp_inst; if (rdp_inst != NULL) { rdpChannels* channels = rdp_inst->context->channels;