summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/libnet/libnet_become_dc.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c
index b95aae1fa4..89c993eb77 100644
--- a/source4/libnet/libnet_become_dc.c
+++ b/source4/libnet/libnet_become_dc.c
@@ -2154,13 +2154,12 @@ struct composite_context *libnet_BecomeDC_send(struct libnet_context *ctx, TALLO
if (composite_nomem(s->dest_dsa.netbios_name, c)) return c;
/* Destination DSA dns_name construction */
- tmp_name = strlower_talloc(s, s->dest_dsa.netbios_name);
+ tmp_name = strlower_talloc(s, s->dest_dsa.netbios_name);
if (composite_nomem(tmp_name, c)) return c;
- s->dest_dsa.dns_name = talloc_asprintf(s, "%s.%s",
- tmp_name,
- s->domain.dns_name);
- talloc_free(tmp_name);
- if (composite_nomem(s->dest_dsa.dns_name, c)) return c;
+ tmp_name = talloc_asprintf_append(tmp_name, ".%s",s->domain.dns_name);
+ if (composite_nomem(tmp_name, c)) return c;
+ s->dest_dsa.dns_name = tmp_name;
+
/* Callback function pointers */
s->callbacks = r->in.callbacks;