[core,peer] set up channelErrorEvent

This commit is contained in:
Armin Novak 2023-03-06 12:53:32 +01:00 committed by David Fort
parent 1bf0bb1a26
commit f068d21a5e

View File

@ -1320,6 +1320,8 @@ void freerdp_peer_context_free(freerdp_peer* client)
{
rdpContext* ctx = client->context;
CloseHandle(ctx->channelErrorEvent);
ctx->channelErrorEvent = NULL;
free(ctx->errorDescription);
ctx->errorDescription = NULL;
rdp_free(ctx->rdp);
@ -1546,6 +1548,12 @@ BOOL freerdp_peer_context_new_ex(freerdp_peer* client, const rdpSettings* settin
update_register_server_callbacks(rdp->update);
autodetect_register_server_callbacks(rdp->autodetect);
if (!(context->channelErrorEvent = CreateEvent(NULL, TRUE, FALSE, NULL)))
{
WLog_ERR(TAG, "CreateEvent failed!");
goto fail;
}
if (!(context->errorDescription = calloc(1, 500)))
{
WLog_ERR(TAG, "calloc failed!");