From: Nick Porter Date: Thu, 9 Apr 2026 13:05:43 +0000 (+0100) Subject: Only standard modules register xlats with their own name X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=HEAD;p=thirdparty%2Ffreeradius-server.git Only standard modules register xlats with their own name Without this, if a virtual server, for example, has the same name as a module which registers an xlat in its name, then, during server shutdown, removing the process module for the virtual server attempts to unregister the xlat which it doesn't own and leads to a seg fault. --- diff --git a/src/lib/server/module.c b/src/lib/server/module.c index 47bbb3212d..edaa452e55 100644 --- a/src/lib/server/module.c +++ b/src/lib/server/module.c @@ -1533,7 +1533,7 @@ static int _module_instance_free(module_instance_t *mi) * Remove all xlat's registered to module instance. */ if (mi->data) { - xlat_func_unregister(mi->name); + if (mi->module->type == DL_MODULE_TYPE_MODULE) xlat_func_unregister(mi->name); xlat_func_unregister_module(mi); }