[core,nla] fix possible memory leak

when no username is used a NULL identity should be passed. Free up this
identity before setting it NULL
This commit is contained in:
akallabeth
2025-02-07 07:33:39 +01:00
parent ae3c2ae161
commit da0229191e

View File

@@ -364,6 +364,7 @@ static BOOL nla_client_setup_identity(rdpNla* nla)
if (!settings->Username)
{
sspi_FreeAuthIdentity(nla->identity);
free(nla->identity);
nla->identity = NULL;
}
else if (settings->SmartcardLogon)