summaryrefslogtreecommitdiffstats
path: root/source3/winbindd/winbindd_dsgetdcname.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-12-12 23:00:41 +0100
committerJeremy Allison <jra@samba.org>2015-02-27 01:16:10 +0100
commit1cb753ae4e371df8555b82139d43a010b69bc3e8 (patch)
treec65f63fd13a3fae048d1ee6c68321d1615aa57a0 /source3/winbindd/winbindd_dsgetdcname.c
parent3ec06454e106e83ae7e72412202b3efcd4e6285b (diff)
downloadsamba-1cb753ae4e371df8555b82139d43a010b69bc3e8.tar.gz
samba-1cb753ae4e371df8555b82139d43a010b69bc3e8.tar.xz
samba-1cb753ae4e371df8555b82139d43a010b69bc3e8.zip
winbind: Simplify winbindd_dsgetdcname_recv
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Feb 27 01:16:10 CET 2015 on sn-devel-104
Diffstat (limited to 'source3/winbindd/winbindd_dsgetdcname.c')
-rw-r--r--source3/winbindd/winbindd_dsgetdcname.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/winbindd/winbindd_dsgetdcname.c b/source3/winbindd/winbindd_dsgetdcname.c
index c447b3aaf1..8eb1de74d9 100644
--- a/source3/winbindd/winbindd_dsgetdcname.c
+++ b/source3/winbindd/winbindd_dsgetdcname.c
@@ -101,6 +101,7 @@ NTSTATUS winbindd_dsgetdcname_recv(struct tevent_req *req,
{
struct winbindd_dsgetdcname_state *state = tevent_req_data(
req, struct winbindd_dsgetdcname_state);
+ struct GUID_txt_buf guid_str_buf;
char *guid_str;
NTSTATUS status;
@@ -109,10 +110,6 @@ NTSTATUS winbindd_dsgetdcname_recv(struct tevent_req *req,
return status;
}
- guid_str = GUID_string(talloc_tos(), &state->dc_info->domain_guid);
- if (guid_str == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
fstrcpy(response->data.dsgetdcname.dc_unc,
state->dc_info->dc_unc);
@@ -120,8 +117,11 @@ NTSTATUS winbindd_dsgetdcname_recv(struct tevent_req *req,
state->dc_info->dc_address);
response->data.dsgetdcname.dc_address_type =
state->dc_info->dc_address_type;
+
+ guid_str = GUID_buf_string(&state->dc_info->domain_guid,
+ &guid_str_buf);
fstrcpy(response->data.dsgetdcname.domain_guid, guid_str);
- TALLOC_FREE(guid_str);
+
fstrcpy(response->data.dsgetdcname.domain_name,
state->dc_info->domain_name);
fstrcpy(response->data.dsgetdcname.forest_name,