summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/libnet/libnet_become_dc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c
index c5e959f309..97be186f72 100644
--- a/source4/libnet/libnet_become_dc.c
+++ b/source4/libnet/libnet_become_dc.c
@@ -2151,10 +2151,11 @@ struct composite_context *libnet_BecomeDC_send(struct libnet_context *ctx, TALLO
/* Destination DSA dns_name construction */
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_append(tmp_name, ".%s",
- s->domain.dns_name);
+ 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;
-
/* Callback function pointers */
s->callbacks = r->in.callbacks;