]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Shutdown bios when closing the connection
authorNick Porter <nick@portercomputing.co.uk>
Tue, 1 Jul 2025 16:30:38 +0000 (17:30 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Tue, 1 Jul 2025 16:32:33 +0000 (17:32 +0100)
src/modules/rlm_radius/bio.c

index f6e056f7ebc531bce375791050e2d7faf2b72278..a7869de8d6b010a758b28d45e883f9ec0357097d 100644 (file)
@@ -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);