libfreerdp-core: fix transport_free in cases where transport thread was not started
This commit is contained in:
parent
6d2608cbcb
commit
f429b909a9
@ -1062,8 +1062,17 @@ void transport_free(rdpTransport* transport)
|
||||
{
|
||||
if (transport->async)
|
||||
{
|
||||
assert(!transport->thread);
|
||||
assert(!transport->stopEvent);
|
||||
if (transport->stopEvent)
|
||||
{
|
||||
SetEvent(transport->stopEvent);
|
||||
WaitForSingleObject(transport->thread, INFINITE);
|
||||
|
||||
CloseHandle(transport->thread);
|
||||
CloseHandle(transport->stopEvent);
|
||||
|
||||
transport->thread = NULL;
|
||||
transport->stopEvent = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (transport->ReceiveBuffer)
|
||||
|
Loading…
Reference in New Issue
Block a user