Fixed double free

This commit is contained in:
akallabeth 2020-05-25 14:03:12 +02:00 committed by Armin Novak
parent 36478d3d0b
commit 6d86e20e1e
1 changed files with 6 additions and 1 deletions

View File

@ -586,14 +586,19 @@ int shadow_server_start(rdpShadowServer* server)
char** list = CommandLineParseCommaSeparatedValuesEx(NULL, server->ipcSocket, &count);
if (!list || (count <= 1))
{
free(list);
if (server->ipcSocket == NULL)
{
if (!open_port(server, NULL))
{
free(list);
return -1;
}
}
else
{
free(list);
return -1;
}
}
for (x = 1; x < count; x++)