server/proxy: Add check after calling p_client_context_create

This commit is contained in:
kubistika 2019-06-13 16:56:21 +03:00 committed by akallabeth
parent 8fbee28dd7
commit 8954e1646b

View File

@ -156,11 +156,15 @@ static BOOL pf_server_post_connect(freerdp_peer* client)
pServerContext* ps;
rdpContext* pc;
proxyData* pdata;
ps = (pServerContext*)client->context;
pdata = ps->pdata;
pc = p_client_context_create(client->settings);
if (pc == NULL)
{
WLog_ERR(TAG, "pf_server_post_connect(): p_client_context_create failed!");
return FALSE;
}
/* keep both sides of the connection in pdata */
((pClientContext*)pc)->pdata = ps->pdata;