From: Alan T. DeKok Date: Tue, 24 Oct 2017 15:55:13 +0000 (-0400) Subject: name2 may be NULL X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89ebf2d0f57aa5e856e9330fa2d79e8bc7060764;p=thirdparty%2Ffreeradius-server.git name2 may be NULL --- diff --git a/src/main/virtual_servers.c b/src/main/virtual_servers.c index 128ec05e4c3..463e584922b 100644 --- a/src/main/virtual_servers.c +++ b/src/main/virtual_servers.c @@ -441,14 +441,19 @@ int virtual_servers_instantiate(UNUSED CONF_SECTION *config) (strcmp(name, "send") != 0)) continue; if (!cf_data_find(subcs, unlang_group_t, NULL)) { + char const *name2; + + name2 = cf_section_name2(subcs); + if (!name2) name2 = ""; + if (check_config) { cf_log_err(subcs, "%s %s { ... } section is unused", - name, cf_section_name2(subcs)); + name, name2); return -1; } cf_log_warn(subcs, "%s %s { ... } section is unused", - name, cf_section_name2(subcs)); + name, name2); } } }