iphlpapi: Don't set the dns server list if there are no servers.

This commit is contained in:
Huw Davies 2013-09-10 14:19:58 +01:00 committed by Alexandre Julliard
parent c0a14564d3
commit 5bfabee8cd

View file

@ -1083,7 +1083,7 @@ ULONG WINAPI DECLSPEC_HOTPATCH GetAdaptersAddresses(ULONG family, ULONG flags, P
size = bytes_left -= size;
}
}
if (!(flags & GAA_FLAG_SKIP_DNS_SERVER))
if (!(flags & GAA_FLAG_SKIP_DNS_SERVER) && dns_server_size)
{
firstDns = (PIP_ADAPTER_DNS_SERVER_ADDRESS)((BYTE *)first_aa + total_size - dns_server_size - dns_suffix_size);
get_dns_server_addresses(firstDns, &dns_server_size);