From ea419300b745e1843cd0992681149b426dcc4db3 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Fri, 23 Jan 2026 22:33:27 +0100 Subject: [PATCH] [client,common] fix memory leak in rdpParser When duplicate lines are found in a RDP file the old entry was not freed up. --- client/common/file.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/common/file.c b/client/common/file.c index 4c9eda34d..e74a9255a 100644 --- a/client/common/file.c +++ b/client/common/file.c @@ -716,6 +716,9 @@ static BOOL freerdp_client_rdp_file_set_string(rdpFile* file, const char* name, if (targetValue) { + if ((uintptr_t)(*targetValue) != UINTPTR_MAX) + free(*targetValue); + *targetValue = _strdup(value); if (!(*targetValue)) return FALSE;