From b496ef0242e360ab7a4d4d16d4538a1b102ac79d Mon Sep 17 00:00:00 2001 From: Nick Porter Date: Tue, 1 Jul 2025 17:30:38 +0100 Subject: [PATCH] Shutdown bios when closing the connection --- src/modules/rlm_radius/bio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/rlm_radius/bio.c b/src/modules/rlm_radius/bio.c index f6e056f7eb..a7869de8d6 100644 --- a/src/modules/rlm_radius/bio.c +++ b/src/modules/rlm_radius/bio.c @@ -671,7 +671,7 @@ static fr_bio_verify_action_t rlm_radius_verify(UNUSED fr_bio_t *bio, void *veri * @todo - rate limit these messages, and find a way to associate them with a request, or even * the logging destination of the module. */ - if (!fr_radius_ok(data, size, h->ctx.inst->max_attributes, REQUIRE_MA(h), &failure)) { + if (!fr_radius_ok(data, size, h->ctx.inst->max_attributes, REQUIRE_MA(h), &failure)) { if (failure == DECODE_FAIL_UNKNOWN_PACKET_CODE) return FR_BIO_VERIFY_DISCARD; PERROR("%s - Connection %s received bad packet", h->ctx.module_name, h->ctx.fd_info->name); @@ -845,6 +845,9 @@ static void conn_close(UNUSED fr_event_list_t *el, void *handle, UNUSED void *uc fr_assert_fail("%u tracking entries still allocated at conn close", h->tt->num_requests); } + fr_bio_shutdown(h->bio.fd); + fr_bio_shutdown(h->bio.mem); + DEBUG4("Freeing handle %p", handle); talloc_free(h); -- 2.47.3