]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix scan issues
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 19 Jun 2017 18:20:15 +0000 (14:20 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 19 Jun 2017 18:20:21 +0000 (14:20 -0400)
src/main/dl.c
src/main/modules.c

index b99628effdbd9b988f67f092578a78a2210e208f..ff91545b1867b645b85ea735565ff64026855658 100644 (file)
@@ -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, "<INVALID>"), 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, "<INVALID>"), name);
+               }
                return -1;
        }
 
index db5b527bfa7c550295424da8fa0db60fae873f60..51d909d90af95212baa5f04e0fcd1318bd8d175d 100644 (file)
@@ -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;
        }