]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't die if the clients file doesn't contain client {}
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 7 Sep 2012 15:39:27 +0000 (16:39 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 7 Sep 2012 15:39:56 +0000 (16:39 +0100)
src/main/client.c

index d50df0ed532f4db6fbd1f37855c1fd19ea317140..9f6ba0ebf01feaff01d983a5573391acabd27c00 100644 (file)
@@ -1165,8 +1165,14 @@ RADCLIENT *client_read(const char *filename, int in_server, int flag)
 
        cs = cf_file_read(filename);
        if (!cs) return NULL;
+       
+       cs = cf_section_sub_find(cs, "client");
+       if (!cs) {
+               radlog(L_ERR, "No \"client\" section found in client file");
+               return NULL;
+       }
 
-       c = client_parse(cf_section_sub_find(cs, "client"), in_server);
+       c = client_parse(cs, in_server);
 
        p = strrchr(filename, FR_DIR_SEP);
        if (p) {