From 4c5411c7792e1a152c65df4d71c2ad56a2f77c66 Mon Sep 17 00:00:00 2001 From: Nick Porter Date: Thu, 9 Apr 2026 14:05:43 +0100 Subject: [PATCH] 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. --- src/lib/server/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/server/module.c b/src/lib/server/module.c index 47bbb3212de..edaa452e558 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); } -- 2.47.3