From f25fbaee9c1be847ef00cfbf1a4439fdd51f2fa6 Mon Sep 17 00:00:00 2001 From: Pascal Nowack Date: Fri, 26 Jun 2020 16:33:19 +0200 Subject: [PATCH] nsc: Fix memory leak Fixes the following memory leak: ==115716== 16,662,960 bytes in 459 blocks are definitely lost in loss record 3,504 of 3,504 ==115716== at 0x48396AF: malloc (vg_replace_malloc.c:306) ==115716== by 0x4C6A4E2: nsc_context_initialize_encode (nsc_encode.c:77) ==115716== by 0x4C6A4E2: nsc_compose_message (nsc_encode.c:497) --- libfreerdp/codec/nsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfreerdp/codec/nsc.c b/libfreerdp/codec/nsc.c index 6627e0b63..dc3a978ed 100644 --- a/libfreerdp/codec/nsc.c +++ b/libfreerdp/codec/nsc.c @@ -364,7 +364,7 @@ void nsc_context_free(NSC_CONTEXT* context) if (context->priv) { - for (i = 0; i < 4; i++) + for (i = 0; i < 5; i++) free(context->priv->PlaneBuffers[i]); nsc_profiler_print(context->priv);