Fixed loop condition.

This commit is contained in:
Armin Novak 2015-06-24 10:08:04 +02:00
parent a809b87362
commit ee221315db

View File

@ -207,8 +207,10 @@ int rdp_redirection_apply_settings(rdpRdp* rdp)
settings->TargetNetAddresses[i] = _strdup(redirection->TargetNetAddresses[i]);
if (!settings->TargetNetAddresses[i])
{
for (; i > 0; --i)
free(settings->TargetNetAddresses[i]);
UINT32 j;
for (j=0; j < i; j++)
free(settings->TargetNetAddresses[j]);
return -1;
}
}