From: Arran Cudbard-Bell Date: Mon, 19 Jun 2017 18:20:15 +0000 (-0400) Subject: Fix scan issues X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=827f9b4f9717708eba896dc2773eb5193ef5200f;p=thirdparty%2Ffreeradius-server.git Fix scan issues --- diff --git a/src/main/dl.c b/src/main/dl.c index b99628effdb..ff91545b186 100644 --- a/src/main/dl.c +++ b/src/main/dl.c @@ -826,7 +826,13 @@ int dl_instance(TALLOC_CTX *ctx, dl_instance_t **out, */ dl_inst->module = dl_module(conf, parent ? parent->module : NULL, name, type); if (!dl_inst->module) { - cf_log_err(conf, "Failed finding dl_instance library for '%s_%s'", parent->module->common->name, name); + if (parent) { + cf_log_err(conf, "Failed loding module for '%s_%s'", + parent->module->common->name, name); + } else { + cf_log_err(conf, "Failed loading module for '%s_%s'", + fr_int2str(dl_type_prefix, type, ""), name); + } talloc_free(dl_inst); return -1; } @@ -835,7 +841,13 @@ int dl_instance(TALLOC_CTX *ctx, dl_instance_t **out, * ctx here is the main module's instance data */ if (dl_instance_data_alloc(dl_inst, &dl_inst->data, dl_inst->module, conf) < 0) { - cf_log_perr(conf, "Failed allocating instance data for '%s_%s'", parent->module->common->name, name); + if (parent) { + cf_log_perr(conf, "Failed allocating instance data for '%s_%s'", + parent->module->common->name, name); + } else { + cf_log_err(conf, "Failed allocating instance data for '%s_%s'", + fr_int2str(dl_type_prefix, type, ""), name); + } return -1; } diff --git a/src/main/modules.c b/src/main/modules.c index db5b527bfa7..51d909d90af 100644 --- a/src/main/modules.c +++ b/src/main/modules.c @@ -870,7 +870,7 @@ static module_instance_t *module_bootstrap(CONF_SECTION *modules, CONF_SECTION * mod_inst->module = (rad_module_t const *)mod_inst->dl_inst->module->common; if (!mod_inst->module) { - cf_log_err(cs, "Missing module public structure for \"%s\"", mod_inst->module->name); + cf_log_err(cs, "Missing module public structure for \"%s\"", mod_inst->name); talloc_free(mod_inst); return NULL; }