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:
Vic Lee 2012-06-28 14:53:43 +08:00
parent 8a47893eb2
commit f76a50c53b
4 changed files with 1 additions and 3 deletions

View File

@ -394,6 +394,7 @@ void freerdp_peer_free(freerdp_peer* client)
if (client)
{
rdp_free(client->context->rdp);
xfree(client->context);
xfree(client);
}
}

View File

@ -50,7 +50,6 @@ void wf_peer_context_free(freerdp_peer* client, wfPeerContext* context)
{
if (context)
{
xfree(context);
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}