]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Avoid NULL pointer error
authorNick Porter <nick@portercomputing.co.uk>
Thu, 13 Apr 2023 17:23:42 +0000 (18:23 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 13 Apr 2023 17:23:42 +0000 (18:23 +0100)
src/modules/rlm_redis/rlm_redis.c

index d9bea2dfde4f99be29965fed57b69b0407bf4318..df54f9cb540c914ba89d7ce24f28f67a2e7099c3 100644 (file)
@@ -840,6 +840,7 @@ static int mod_bootstrap(module_inst_ctx_t const *mctx)
         *      Loop over the lua functions, registering an xlat
         *      that'll call that function specifically.
         */
+       if (!inst->lua.funcs) return 0;
        talloc_foreach(inst->lua.funcs, func) {
                name = talloc_asprintf(NULL, "%s.%s", mctx->inst->name, func->name);
                if (unlikely((xlat = xlat_func_register_module(inst, mctx, name, redis_lua_func_xlat, FR_TYPE_VOID)) == NULL)) return -1;