Commit 9521640a authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

iphlpapi: Return early on error.

This prevents using err uninitialized. Spotted by Fabian Maurer. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51655Signed-off-by: 's avatarHuw Davies <huw@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 2fd0e56a
......@@ -1206,15 +1206,11 @@ static DWORD dns_info_alloc( IP_ADAPTER_ADDRESSES *aa, ULONG family, ULONG flags
}
}
if (servers != (DNS_ADDR_ARRAY *)buf) heap_free( servers );
if (err) goto err;
if (err) return err;
}
aa->DnsSuffix = heap_alloc( MAX_DNS_SUFFIX_STRING_LENGTH * sizeof(WCHAR) );
if (!aa->DnsSuffix)
{
err = ERROR_NOT_ENOUGH_MEMORY;
goto err;
}
if (!aa->DnsSuffix) return ERROR_NOT_ENOUGH_MEMORY;
aa->DnsSuffix[0] = '\0';
if (!DnsQueryConfig( DnsConfigSearchList, 0, name, NULL, NULL, &size ) &&
......@@ -1231,8 +1227,7 @@ static DWORD dns_info_alloc( IP_ADAPTER_ADDRESSES *aa, ULONG family, ULONG flags
aa = aa->Next;
}
err:
return err;
return ERROR_SUCCESS;
}
static DWORD adapters_addresses_alloc( ULONG family, ULONG flags, IP_ADAPTER_ADDRESSES **info )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment