[client,common] fix memory leak in rdpParser

When duplicate lines are found in a RDP file the old entry was not freed
up.
This commit is contained in:
akallabeth
2026-01-23 22:33:27 +01:00
parent dde93d1aa2
commit ea419300b7

View File

@@ -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;