From: Arran Cudbard-Bell Date: Fri, 7 Sep 2012 15:39:27 +0000 (+0100) Subject: Don't die if the clients file doesn't contain client {} X-Git-Tag: release_2_2_0~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf70619fa6854ba09d69ed19c04314e2fd6ba8f6;p=thirdparty%2Ffreeradius-server.git Don't die if the clients file doesn't contain client {} --- diff --git a/src/main/client.c b/src/main/client.c index d6aea16ce45..408148a7bc1 100644 --- a/src/main/client.c +++ b/src/main/client.c @@ -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) {