core: fix memory leak in case of error out.

This commit is contained in:
Zhang Zhaolong 2014-04-26 13:44:28 +08:00
parent e8f34b845e
commit e64a64dcd6

View File

@ -360,6 +360,10 @@ BOOL TsProxyCreateTunnelReadResponse(rdpTsg* tsg, RPC_PDU* pdu)
if (MsgBytes > TSG_MESSAGING_MAX_MESSAGE_LENGTH)
{
fprintf(stderr, "Out of Spec Message Length %d", MsgBytes);
free(tsgCaps);
free(versionCaps);
free(packetCapsResponse);
free(packet);
return FALSE;
}
offset += MsgBytes;