summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/libnet/libnet_join.c2
-rw-r--r--source4/libnet/libnet_rpc.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c
index d7b80abc55..6f32a6ec37 100644
--- a/source4/libnet/libnet_join.c
+++ b/source4/libnet/libnet_join.c
@@ -1147,7 +1147,7 @@ static NTSTATUS libnet_Join_primary_domain(struct libnet_context *ctx,
if (r->in.netbios_name != NULL) {
netbios_name = r->in.netbios_name;
} else {
- netbios_name = talloc_reference(tmp_mem, lp_netbios_name(ctx->lp_ctx));
+ netbios_name = talloc_strdup(tmp_mem, lp_netbios_name(ctx->lp_ctx));
if (!netbios_name) {
r->out.error_string = NULL;
talloc_free(tmp_mem);
diff --git a/source4/libnet/libnet_rpc.c b/source4/libnet/libnet_rpc.c
index 4524448928..1c3c5916d4 100644
--- a/source4/libnet/libnet_rpc.c
+++ b/source4/libnet/libnet_rpc.c
@@ -113,7 +113,7 @@ static struct composite_context* libnet_RpcConnectSrv_send(struct libnet_context
}
if (r->level == LIBNET_RPC_CONNECT_SERVER_ADDRESS) {
- b->target_hostname = talloc_reference(b, r->in.name);
+ b->target_hostname = talloc_strdup(b, r->in.name);
if (composite_nomem(b->target_hostname, c)) {
return c;
}