At least at this point doing memory copying is not required. Probably
it was a workaround for some problem in the earlier days of DoH, at
this point it appears to be a waste of CPU cycles.
tls_do_bio(sock, NULL, req, false);
done:
- isc_mem_free(sock->mgr->mctx, req->uvbuf.base);
isc__nm_uvreq_put(&req, sock);
return;
}
isc_nmhandle_attach(handle, &uvreq->handle);
uvreq->cb.send = cb;
uvreq->cbarg = cbarg;
-
- uvreq->uvbuf.base = isc_mem_allocate(sock->mgr->mctx, region->length);
- memmove(uvreq->uvbuf.base, region->base, region->length);
+ uvreq->uvbuf.base = (char *)region->base;
uvreq->uvbuf.len = region->length;
/*