GUAC-1389: Do not attempt to free RDP client until client thread finishes.

This commit is contained in:
Michael Jumper 2016-03-04 16:03:09 -08:00
parent 51aaa193f2
commit 2f58469f1b

View File

@ -95,6 +95,9 @@ int guac_rdp_client_free_handler(guac_client* client) {
guac_rdp_client* rdp_client = (guac_rdp_client*) client->data; 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; freerdp* rdp_inst = rdp_client->rdp_inst;
if (rdp_inst != NULL) { if (rdp_inst != NULL) {
rdpChannels* channels = rdp_inst->context->channels; rdpChannels* channels = rdp_inst->context->channels;