From: Alan T. DeKok Date: Tue, 25 May 2021 14:56:59 +0000 (-0400) Subject: Revert "hoist "set global client list" to client_list_init()" X-Git-Tag: release_3_0_23~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b25994b85051ff8ac334f7e37418dcde8704b80a;p=thirdparty%2Ffreeradius-server.git Revert "hoist "set global client list" to client_list_init()" This reverts commit 0a36ef3dafaa9b4c5415772ec43b08b34e93be8b. --- diff --git a/src/main/client.c b/src/main/client.c index 20a5a927c77..7f4d6545bb9 100644 --- a/src/main/client.c +++ b/src/main/client.c @@ -158,10 +158,6 @@ RADCLIENT_LIST *client_list_init(CONF_SECTION *cs) client_list_free(clients); return false; } - if (!cs) { - rad_assert(root_clients == NULL); - root_clients = clients; - } return clients; } @@ -701,6 +697,13 @@ RADCLIENT_LIST *client_list_parse_section(CONF_SECTION *section, UNUSED bool tls } + /* + * Replace the global list of clients with the new one. + * The old one is still referenced from the original + * configuration, and will be freed when that is freed. + */ + if (global) root_clients = clients; + return clients; }