s4:libnet: use talloc_strdup() instead of talloc_reference()
[amitay/samba.git] / source4 / libnet / libnet_rpc.c
index 45244489280d979a0033d163978b94ae3f84cc77..1c3c5916d4c0126d6e516faa2f6f559922dcd955 100644 (file)
@@ -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;
                }