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);
}
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;
}