mirror of https://github.com/FreeRDP/FreeRDP
libfreerdp-core/server: fix a corrupted memory access issue.
The peer context memory block should not be freed by the server implementation because it still needs to be accessed after the context free callback has been called. It should be the core's responsibility to free it.
This commit is contained in:
parent
8a47893eb2
commit
f76a50c53b
|
@ -394,6 +394,7 @@ void freerdp_peer_free(freerdp_peer* client)
|
|||
if (client)
|
||||
{
|
||||
rdp_free(client->context->rdp);
|
||||
xfree(client->context);
|
||||
xfree(client);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,6 @@ void wf_peer_context_free(freerdp_peer* client, wfPeerContext* context)
|
|||
{
|
||||
if (context)
|
||||
{
|
||||
xfree(context);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -273,7 +273,6 @@ void xf_peer_context_free(freerdp_peer* client, xfPeerContext* context)
|
|||
{
|
||||
stream_free(context->s);
|
||||
rfx_context_free(context->rfx_context);
|
||||
xfree(context);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -123,7 +123,6 @@ void test_peer_context_free(freerdp_peer* client, testPeerContext* context)
|
|||
audin_server_context_free(context->audin);
|
||||
}
|
||||
WTSDestroyVirtualChannelManager(context->vcm);
|
||||
xfree(context);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue