1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

lib: Use GUID_buf_string in discover_dc_dns

One talloc call less..

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2015-12-05 18:46:34 +01:00 committed by Jeremy Allison
parent 9bc3f48298
commit 557169d1a0

View File

@ -543,7 +543,6 @@ static NTSTATUS discover_dc_dns(TALLOC_CTX *mem_ctx,
int numaddrs = 0;
struct ip_service_name *dclist = NULL;
int count = 0;
char *guid_string;
if (flags & DS_PDC_REQUIRED) {
status = ads_dns_query_pdc(mem_ctx,
@ -569,17 +568,14 @@ static NTSTATUS discover_dc_dns(TALLOC_CTX *mem_ctx,
&dcs,
&numdcs);
} else if (domain_guid) {
guid_string = GUID_string(mem_ctx, domain_guid);
if (!guid_string) {
return NT_STATUS_NO_MEMORY;
}
struct GUID_txt_buf buf;
GUID_buf_string(domain_guid, &buf);
status = ads_dns_query_dcs_guid(mem_ctx,
domain_name,
guid_string,
buf.buf,
&dcs,
&numdcs);
TALLOC_FREE(guid_string);
} else {
status = ads_dns_query_dcs(mem_ctx,
domain_name,