Exemplo n.º 1
0
void redirection_free(rdpRedirection* redirection)
{
	if (redirection != NULL)
	{
		freerdp_string_free(&redirection->tsvUrl);
		freerdp_string_free(&redirection->username);
		freerdp_string_free(&redirection->domain);
		freerdp_string_free(&redirection->password);
		freerdp_string_free(&redirection->targetFQDN);
		freerdp_string_free(&redirection->targetNetBiosName);
		freerdp_string_free(&redirection->targetNetAddress);
		freerdp_blob_free(&redirection->loadBalanceInfo);

		if (redirection->targetNetAddresses != NULL)
		{
			int i;

			for (i = 0; i < redirection->targetNetAddressesCount; i++)
				freerdp_string_free(&redirection->targetNetAddresses[i]);

			xfree(redirection->targetNetAddresses);
		}

		xfree(redirection);
	}
}
Exemplo n.º 2
0
void redirection_free(rdpRedirection* redirection)
{
	if (redirection != NULL)
	{
		//these four have already been freed in settings_free() and freerdp_string_free() checks for NULL
		redirection->username.ascii = NULL;
		redirection->domain.ascii = NULL;
		redirection->targetNetAddress.ascii = NULL;
		redirection->targetNetBiosName.ascii = NULL;

		freerdp_string_free(&redirection->tsvUrl);
		freerdp_string_free(&redirection->username);
		freerdp_string_free(&redirection->domain);
		freerdp_blob_free(&redirection->password_cookie);
		freerdp_string_free(&redirection->targetFQDN);
		freerdp_string_free(&redirection->targetNetBiosName);
		freerdp_string_free(&redirection->targetNetAddress);
		freerdp_blob_free(&redirection->loadBalanceInfo);

		if (redirection->targetNetAddresses != NULL)
		{
			int i;

			for (i = 0; i < (int) redirection->targetNetAddressesCount; i++)
				freerdp_string_free(&redirection->targetNetAddresses[i]);

			xfree(redirection->targetNetAddresses);
		}

		xfree(redirection);
	}
}