CommandLineSwitchCase(arg, "v")
{
+ free (settings->ServerHostname);
p = strchr(arg->Value, '[');
/* ipv4 */
if (!p)
}
CommandLineSwitchCase(arg, "spn-class")
{
+ free (settings->AuthenticationServiceClass);
if (!(settings->AuthenticationServiceClass = _strdup(arg->Value)))
return COMMAND_LINE_ERROR_MEMORY;
if (arg->Flags & COMMAND_LINE_VALUE_PRESENT)
{
settings->SendPreconnectionPdu = TRUE;
+ free (settings->PreconnectionBlob);
if (!(settings->PreconnectionBlob = _strdup(arg->Value)))
return COMMAND_LINE_ERROR_MEMORY;
}
}
CommandLineSwitchCase(arg, "t")
{
+ free (settings->WindowTitle);
if (!(settings->WindowTitle = _strdup(arg->Value)))
return COMMAND_LINE_ERROR_MEMORY;
}
{
settings->ConsoleSession = TRUE;
settings->RestrictedAdminModeRequired = TRUE;
+ free (settings->PasswordHash);
if (!(settings->PasswordHash = _strdup(arg->Value)))
return COMMAND_LINE_ERROR_MEMORY;
}
CommandLineSwitchCase(arg, "client-hostname")
{
+ free (settings->ClientHostname);
if (!(settings->ClientHostname = _strdup(arg->Value)))
return COMMAND_LINE_ERROR_MEMORY;
}
}
CommandLineSwitchCase(arg, "d")
{
+ free (settings->Domain);
if (!(settings->Domain = _strdup(arg->Value)))
return COMMAND_LINE_ERROR_MEMORY;
}
CommandLineSwitchCase(arg, "p")
{
+ free (settings->Password);
if (!(settings->Password = _strdup(arg->Value)))
return COMMAND_LINE_ERROR_MEMORY;
}
CommandLineSwitchCase(arg, "g")
{
+ free (settings->GatewayHostname);
if (arg->Flags & COMMAND_LINE_VALUE_PRESENT)
{
p = strchr(arg->Value, ':');
}
CommandLineSwitchCase(arg, "gd")
{
+ free (settings->GatewayDomain);
if (!(settings->GatewayDomain = _strdup(arg->Value)))
return COMMAND_LINE_ERROR_MEMORY;
settings->GatewayUseSameCredentials = FALSE;
}
CommandLineSwitchCase(arg, "gp")
{
+ free (settings->GatewayPassword);
if (!(settings->GatewayPassword = _strdup(arg->Value)))
return COMMAND_LINE_ERROR_MEMORY;
settings->GatewayUseSameCredentials = FALSE;
}
CommandLineSwitchCase(arg, "app")
{
+ free (settings->RemoteApplicationProgram);
if (!(settings->RemoteApplicationProgram = _strdup(arg->Value)))
return COMMAND_LINE_ERROR_MEMORY;
}
CommandLineSwitchCase(arg, "load-balance-info")
{
+ free (settings->LoadBalanceInfo);
if (!(settings->LoadBalanceInfo = (BYTE*) _strdup(arg->Value)))
return COMMAND_LINE_ERROR_MEMORY;
settings->LoadBalanceInfoLength = (UINT32) strlen((char*) settings->LoadBalanceInfo);
}
CommandLineSwitchCase(arg, "app-name")
{
+ free (settings->RemoteApplicationName);
if (!(settings->RemoteApplicationName = _strdup(arg->Value)))
return COMMAND_LINE_ERROR_MEMORY;
}
CommandLineSwitchCase(arg, "app-icon")
{
+ free (settings->RemoteApplicationIcon);
if (!(settings->RemoteApplicationIcon = _strdup(arg->Value)))
return COMMAND_LINE_ERROR_MEMORY;
}
CommandLineSwitchCase(arg, "app-cmd")
{
+ free (settings->RemoteApplicationCmdLine);
if (!(settings->RemoteApplicationCmdLine = _strdup(arg->Value)))
return COMMAND_LINE_ERROR_MEMORY;
}
CommandLineSwitchCase(arg, "app-file")
{
+ free (settings->RemoteApplicationFile);
if (!(settings->RemoteApplicationFile = _strdup(arg->Value)))
return COMMAND_LINE_ERROR_MEMORY;
}
CommandLineSwitchCase(arg, "app-guid")
{
+ free (settings->RemoteApplicationGuid);
if (!(settings->RemoteApplicationGuid = _strdup(arg->Value)))
return COMMAND_LINE_ERROR_MEMORY;
}
}
CommandLineSwitchCase(arg, "shell")
{
+ free (settings->AlternateShell);
if (!(settings->AlternateShell = _strdup(arg->Value)))
return COMMAND_LINE_ERROR_MEMORY;
}
CommandLineSwitchCase(arg, "shell-dir")
{
+ free (settings->ShellWorkingDirectory);
if (!(settings->ShellWorkingDirectory = _strdup(arg->Value)))
return COMMAND_LINE_ERROR_MEMORY;
}
CommandLineSwitchCase(arg, "pcb")
{
settings->SendPreconnectionPdu = TRUE;
+ free (settings->PreconnectionBlob);
if (!(settings->PreconnectionBlob = _strdup(arg->Value)))
return COMMAND_LINE_ERROR_MEMORY;
}
}
CommandLineSwitchCase(arg, "tls-ciphers")
{
+ free (settings->AllowedTlsCiphers);
if (strcmp(arg->Value, "netmon") == 0)
{
if (!(settings->AllowedTlsCiphers = _strdup("ALL:!ECDH")))
}
CommandLineSwitchCase(arg, "cert-name")
{
+ free (settings->CertificateName);
if (!(settings->CertificateName = _strdup(arg->Value)))
return COMMAND_LINE_ERROR_MEMORY;
}
}
CommandLineSwitchCase(arg, "wm-class")
{
+ free (settings->WmClass);
if (!(settings->WmClass = _strdup(arg->Value)))
return COMMAND_LINE_ERROR_MEMORY;
}
CommandLineSwitchCase(arg, "play-rfx")
{
+ free (settings->PlayRemoteFxFile);
if (!(settings->PlayRemoteFxFile = _strdup(arg->Value)))
return COMMAND_LINE_ERROR_MEMORY;
settings->PlayRemoteFx = TRUE;
CommandLineSwitchCase(arg, "assistance")
{
settings->RemoteAssistanceMode = TRUE;
+ free (settings->RemoteAssistancePassword);
if (!(settings->RemoteAssistancePassword = _strdup(arg->Value)))
return COMMAND_LINE_ERROR_MEMORY;
}
}
while ((arg = CommandLineFindNextArgumentA(arg)) != NULL);
+ free (settings->Username);
if (!settings->Domain && user)
{
BOOL ret;
+ free (settings->Domain);
+
ret = freerdp_parse_username(user, &settings->Username, &settings->Domain);
free(user);
if (!ret)
else
settings->Username = user;
+ free (settings->GatewayUsername);
if (!settings->GatewayDomain && gwUser)
{
BOOL ret;
+ free (settings->GatewayDomain);
ret = freerdp_parse_username(gwUser, &settings->GatewayUsername,
&settings->GatewayDomain);
free(gwUser);