From 31c43d4b76b11e99d667dd035a85b716762e40a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ondr=CC=8Cej=20Sury=CC=81?= Date: Thu, 27 Jul 2023 11:31:06 +0200 Subject: [PATCH] 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. --- lib/dns/zone.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/dns/zone.c b/lib/dns/zone.c index dfbdb66040..e499444a93 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -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) {