2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Refactored dns_message_t for using attach/detach semantics

This commit will be used as a base for the next code updates in order
to have a better control of dns_message_t objects' lifetime.
This commit is contained in:
Diego Fronza
2020-09-21 16:16:15 -03:00
committed by Ondřej Surý
parent e6f2f79ff2
commit 12d6d13100
26 changed files with 142 additions and 115 deletions

View File

@@ -4561,8 +4561,8 @@ fctx_destroy(fetchctx_t *fctx) {
isc_counter_detach(&fctx->qc);
fcount_decr(fctx);
isc_timer_detach(&fctx->timer);
dns_message_destroy(&fctx->rmessage);
dns_message_destroy(&fctx->qmessage);
dns_message_detach(&fctx->rmessage);
dns_message_detach(&fctx->qmessage);
if (dns_name_countlabels(&fctx->domain) > 0) {
dns_name_free(&fctx->domain, fctx->mctx);
}
@@ -5217,10 +5217,10 @@ cleanup_mctx:
isc_timer_detach(&fctx->timer);
cleanup_rmessage:
dns_message_destroy(&fctx->rmessage);
dns_message_detach(&fctx->rmessage);
cleanup_qmessage:
dns_message_destroy(&fctx->qmessage);
dns_message_detach(&fctx->qmessage);
cleanup_fcount:
fcount_decr(fctx);