BOOL TsProxyMakeTunnelCallReadResponse(rdpTsg* tsg, RPC_PDU* pdu)
{
+ BOOL rc = TRUE;
BYTE* buffer;
UINT32 length;
UINT32 offset;
default:
fprintf(stderr, "TsProxyMakeTunnelCallReadResponse: unexpected message type: %d\n",
SwitchValue);
- free(packet);
- return FALSE;
+ rc = FALSE;
break;
}
if (packet)
+ {
+ if (packet->tsgPacket.packetMsgResponse)
+ {
+ if (packet->tsgPacket.packetMsgResponse->messagePacket.reauthMessage)
+ free(packet->tsgPacket.packetMsgResponse->messagePacket.reauthMessage);
+ free(packet->tsgPacket.packetMsgResponse);
+ }
free(packet);
+ }
- return TRUE;
+ return rc;
}
BOOL TsProxyMakeTunnelCall(rdpTsg* tsg, PTUNNEL_CONTEXT_HANDLE_NOSERIALIZE tunnelContext,