Skip to content

Commit 4c5411c

Browse files
committed
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.
1 parent b404c39 commit 4c5411c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/lib/server/module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1533,7 +1533,7 @@ static int _module_instance_free(module_instance_t *mi)
15331533
* Remove all xlat's registered to module instance.
15341534
*/
15351535
if (mi->data) {
1536-
xlat_func_unregister(mi->name);
1536+
if (mi->module->type == DL_MODULE_TYPE_MODULE) xlat_func_unregister(mi->name);
15371537
xlat_func_unregister_module(mi);
15381538
}
15391539

0 commit comments

Comments
 (0)