]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Clean up modules, etc. before freeing mainconfig
authorAlan T. DeKok <aland@freeradius.org>
Tue, 19 Feb 2013 00:09:11 +0000 (19:09 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 19 Feb 2013 22:04:55 +0000 (17:04 -0500)
src/main/mainconfig.c

index a16a53f088974c05ba63e5274c6f1b4961cd521d..c4ada24b2a6c9d3a1811972abe9ad47dd090e231 100644 (file)
@@ -998,6 +998,14 @@ int free_mainconfig(void)
 
        virtual_servers_free(0);
 
+       /*
+        *      Clean up the configuration data
+        *      structures.
+        */
+       clients_free(NULL);
+       realms_free();
+       listen_free(&mainconfig.listen);
+
        /*
         *      Free all of the cached configurations.
         */
@@ -1007,12 +1015,6 @@ int free_mainconfig(void)
                free(cc);
        }
 
-       /*
-        *      Clean up the configuration data
-        *      structures.
-        */
-       realms_free();
-       listen_free(&mainconfig.listen);
        dict_free();
 
        return 0;