]> 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:27 +0000 (16:39 +0100)
src/main/client.c

index d6aea16ce45678bb2a7d57b1d9ab814280680d8d..408148a7bc1bb3948e8b7fde6f1f671718852981 100644 (file)
@@ -1122,8 +1122,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) {