Fixed memory leaks.

This commit is contained in:
Armin Novak 2014-11-17 00:28:17 +01:00
parent bfd3962f03
commit a594a15220

View File

@ -824,7 +824,10 @@ int rts_send_keep_alive_pdu(rdpRpc* rpc)
length = header.frag_length;
if (rpc_in_write(rpc, buffer, length) < 0)
{
free (buffer);
return -1;
}
free(buffer);
return length;
@ -866,7 +869,10 @@ int rts_send_flow_control_ack_pdu(rdpRpc* rpc)
length = header.frag_length;
if (rpc_in_write(rpc, buffer, length) < 0)
{
free (buffer);
return -1;
}
free(buffer);
return 0;
@ -958,7 +964,10 @@ int rts_send_ping_pdu(rdpRpc* rpc)
length = header.frag_length;
if (rpc_in_write(rpc, buffer, length) < 0)
{
free (buffer);
return -1;
}
free(buffer);
return length;