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_2_4~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bda81b8d6e91c958a3b54fe7110a29430c29c847;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 fd4334db96e..9ccb3103ae0 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");