From a594a15220e4c7fdc456d62e3b79ad9d561c41ef Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Mon, 17 Nov 2014 00:28:17 +0100 Subject: [PATCH] Fixed memory leaks. --- libfreerdp/core/gateway/rts.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libfreerdp/core/gateway/rts.c b/libfreerdp/core/gateway/rts.c index ca11fdb..a4d20f4 100644 --- a/libfreerdp/core/gateway/rts.c +++ b/libfreerdp/core/gateway/rts.c @@ -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; -- 2.7.4