]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Correct talloc parenting of dynamic radclient
authorNick Porter <nick@portercomputing.co.uk>
Tue, 26 Aug 2025 13:18:11 +0000 (14:18 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Tue, 26 Aug 2025 13:18:11 +0000 (14:18 +0100)
src/lib/io/master.c

index 3c371937c8882838aaac26cd76292eedb9088657..3f88c77985a7452480c7cbff9047200c03345915 100644 (file)
@@ -1661,6 +1661,12 @@ do_read:
                }
 
                MEM(client = client_alloc(thread, state, inst, thread, radclient, network));
+
+               /*
+                *      Parent the dynamic client radclient off the client - it
+                *      is the client which gets freed by the dynamic client timers.
+                */
+               if (state == PR_CLIENT_PENDING) talloc_steal(client, radclient);
        }
 
 have_client: