]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix abort on error
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 3 Jul 2018 17:43:36 +0000 (13:43 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 3 Jul 2018 17:43:39 +0000 (13:43 -0400)
src/main/mainconfig.c

index 3d7511aac65fdfa69a523073e69e150704b3343e..55747fac3449590a52e770b15efae6bab40d1974 100644 (file)
@@ -1207,7 +1207,6 @@ do {\
         *      to ensure that the pointers are always valid.
         */
        rad_assert(config->root_cs == NULL);
-       config->root_cs = cs;
 
        DEBUG2("%s: #### Loading Clients ####", config->name);
        if (!client_list_parse_section(cs, false)) goto failure;
@@ -1233,6 +1232,8 @@ do {\
        }
 #endif
 
+       config->root_cs = cs;   /* Do this last to avoid dangling pointers on error */
+
        /* Clear any unprocessed configuration errors */
        (void) fr_strerror();