Check some return values

This commit is contained in:
David FORT 2015-05-26 15:49:38 +02:00
parent 909a965fe9
commit a9709a62cc
2 changed files with 13 additions and 4 deletions

View File

@ -161,7 +161,12 @@ int freerdp_assistance_parse_address_list(rdpAssistanceFile* file, char* list)
file->MachinePorts = (UINT32*) calloc(count, sizeof(UINT32));
if (!file->MachineAddresses || !file->MachinePorts)
{
free(file->MachineAddresses);
free(file->MachinePorts);
free(tokens);
return -1;
}
for (i = 0; i < count; i++)
{

View File

@ -321,7 +321,8 @@ int rpc_client_recv_fragment(rdpRpc* rpc, wStream* fragment)
if (rpc->VirtualConnection->DefaultOutChannel->ReceiverAvailableWindow < (rpc->ReceiveWindow / 2))
{
rts_send_flow_control_ack_pdu(rpc);
if (rts_send_flow_control_ack_pdu(rpc) < 0)
return -1;
}
if (!rpc_get_stub_data_info(rpc, buffer, &StubOffset, &StubLength))
@ -412,7 +413,8 @@ int rpc_client_recv_fragment(rdpRpc* rpc, wStream* fragment)
return -1;
Stream_Write(pdu->s, buffer, Stream_Length(fragment));
Stream_SealLength(pdu->s);
rpc_client_recv_pdu(rpc, pdu);
if (rpc_client_recv_pdu(rpc, pdu) < 0)
return -1;
rpc_pdu_reset(pdu);
}
else
@ -420,7 +422,8 @@ int rpc_client_recv_fragment(rdpRpc* rpc, wStream* fragment)
if (rpc->VirtualConnection->State < VIRTUAL_CONNECTION_STATE_OPENED)
WLog_ERR(TAG, "warning: unhandled RTS PDU");
rts_recv_out_of_sequence_pdu(rpc, buffer, header->common.frag_length);
if (rts_recv_out_of_sequence_pdu(rpc, buffer, header->common.frag_length) < 0)
return -1;
}
return 1;
@ -434,7 +437,8 @@ int rpc_client_recv_fragment(rdpRpc* rpc, wStream* fragment)
return -1;
Stream_Write(pdu->s, buffer, Stream_Length(fragment));
Stream_SealLength(pdu->s);
rpc_client_recv_pdu(rpc, pdu);
if (rpc_client_recv_pdu(rpc, pdu) < 0)
return -1;
rpc_pdu_reset(pdu);
return 1;