]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
If we're not saving the packet, clear u->packet
authorNick Porter <nick@portercomputing.co.uk>
Thu, 6 Mar 2025 16:14:04 +0000 (16:14 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 6 Mar 2025 16:14:04 +0000 (16:14 +0000)
So bio_request_reset doesn't attempt to free it.

src/modules/rlm_radius/bio.c

index 3b277c379fb017bf78b38d0eea29183bbcca3885..1221ca61da325f3862c293c6d02208de015ecb08 100644 (file)
@@ -1715,7 +1715,10 @@ do_write:
        /*
         *      If we only send one datagram packet, then don't bother saving it.
         */
-       if (u->retry.config && u->retry.config->mrc == 1) return;
+       if (u->retry.config && u->retry.config->mrc == 1) {
+               u->packet = NULL;
+               return;
+       }
 
        MEM(u->packet = talloc_memdup(u, u->packet, u->packet_len));
 }