From: Alan T. DeKok Date: Sat, 18 May 2024 20:50:56 +0000 (-0400) Subject: allocate instance data even if the module doesn't need it X-Git-Tag: release_3_0_27~43 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d15b1852ec2d2824e87e398fadd1c4823e0f6d51;p=thirdparty%2Ffreeradius-server.git allocate instance data even if the module doesn't need it which lets the rest of the distinguish virtual attributes from typos in xlat functions --- diff --git a/src/main/modules.c b/src/main/modules.c index fd4334db96..9ccb3103ae 100644 --- a/src/main/modules.c +++ b/src/main/modules.c @@ -571,10 +571,10 @@ static int module_conf_parse(module_instance_t *node, void **handle) * If there is supposed to be instance data, allocate it now. * Also parse the configuration data, if required. */ - if (node->entry->module->inst_size) { - *handle = talloc_zero_array(node, uint8_t, node->entry->module->inst_size); - rad_assert(*handle); + *handle = talloc_zero_array(node, uint8_t, node->entry->module->inst_size); + rad_assert(*handle); + if (node->entry->module->inst_size) { talloc_set_name(*handle, "rlm_%s_t", node->entry->module->name ? node->entry->module->name : "config");