2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

Free struct stub_glue_request in stub_glue_response() callback

When stub_glue_response() is called, the associated data is stored in
newly allocated struct stub_glue_request.  The allocated structure is
never freed in the callback, thus we leak a little bit of memory.
This commit is contained in:
Ondřej Surý 2023-07-27 11:31:06 +02:00
parent 57a568e8f9
commit 31c43d4b76

View File

@ -12880,6 +12880,7 @@ cleanup:
}
dns_name_free(&sgr->name, zone->mctx);
dns_request_destroy(&request);
isc_mem_put(zone->mctx, sgr, sizeof(*sgr));
/* If last request, release all related resources */
if (atomic_fetch_sub_release(&stub->pending_requests, 1) == 1) {