From f8159cc18ac513bd407062a89ccd8c5fb016416b Mon Sep 17 00:00:00 2001 From: akallabeth Date: Mon, 12 Sep 2022 10:54:29 +0200 Subject: [PATCH] Fixed memory leak in nla_send (#8193) --- libfreerdp/core/nla.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libfreerdp/core/nla.c b/libfreerdp/core/nla.c index 422dfbd7d..de29520ba 100644 --- a/libfreerdp/core/nla.c +++ b/libfreerdp/core/nla.c @@ -2163,7 +2163,7 @@ static SECURITY_STATUS nla_decrypt_ts_credentials(rdpNla* nla) BOOL nla_send(rdpNla* nla) { BOOL rc = FALSE; - wStream* s; + wStream* s = NULL; size_t length; WinPrAsn1Encoder* enc; WinPrAsn1_OctetString octet_string; @@ -2262,6 +2262,7 @@ BOOL nla_send(rdpNla* nla) rc = TRUE; fail: + Stream_Free(s, TRUE); WinPrAsn1Encoder_Free(&enc); return rc; }