From 037c612c330f8bb8b7c24b8d9d67da8c57ecb5cd Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Mon, 17 Nov 2014 00:58:43 +0100 Subject: [PATCH] Fixed memory leak. --- libfreerdp/core/gateway/rpc_bind.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libfreerdp/core/gateway/rpc_bind.c b/libfreerdp/core/gateway/rpc_bind.c index 82745d8..a2679d4 100644 --- a/libfreerdp/core/gateway/rpc_bind.c +++ b/libfreerdp/core/gateway/rpc_bind.c @@ -229,9 +229,15 @@ int rpc_send_bind_pdu(rdpRpc* rpc) clientCall = rpc_client_call_new(bind_pdu->call_id, 0); if (!clientCall) + { + free(buffer); return -1; + } if (ArrayList_Add(rpc->client->ClientCallList, clientCall) < 0) + { + free(buffer); return -1; + } if (rpc_send_enqueue_pdu(rpc, buffer, length) != 0) length = -1; -- 2.7.4