]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Set inst->parent first in proto_load_step.c
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 11 Jul 2024 19:21:50 +0000 (15:21 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 11 Jul 2024 19:21:57 +0000 (15:21 -0400)
src/listen/load/proto_load_step.c

index 6460a8bc8a0cab3426083625000734fb83895b0c..c95080bd92993e43d56c2a0c8dae7062babcf0a8 100644 (file)
@@ -384,12 +384,12 @@ static int mod_instantiate(module_inst_ctx_t const *mctx)
                fclose(fp);
        }
 
-       vp = fr_pair_find_by_da(&inst->pair_list, NULL, inst->parent->attr_packet_type);
-       if (vp) inst->code = vp->vp_uint32;
-
        inst->parent = talloc_get_type_abort(mi->parent->data, proto_load_t);
        inst->cs = conf;
 
+       vp = fr_pair_find_by_da(&inst->pair_list, NULL, inst->parent->attr_packet_type);
+       if (vp) inst->code = vp->vp_uint32;
+
        FR_INTEGER_BOUND_CHECK("start_pps", inst->load.start_pps, >=, 10);
        FR_INTEGER_BOUND_CHECK("start_pps", inst->load.start_pps, <, 400000);